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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2022-40471 — RCE 漏洞利用与研究 | Kitploit
工具/GitHubGitHub/rashidkhanpathan/cve-2022-40471
Payload生成漏洞分析漏洞利用ShellcodeWeb应用程序漏洞利用渗透测试
GitHubrashidkhanpathan/cve-2022-40471

CVE-2022-40471

RCE 漏洞利用与研究

查看仓库
10113年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2022-40471

通过无限制文件上传漏洞在Clinic's Patient Management System v 1.0中实现远程代码执行

image

技术描述:

Clinic's Patient Management System v 1.0 中的远程代码执行漏洞允许攻击者通过 users.php 中的个人资料图片上传功能上传任意 php 网页后门(webshell)

受影响组件 - 源代码

在以下源代码中,我们可以看到开发人员直接允许上传任何媒体文件,而没有限制特定的扩展名,这意味着我们可以在那里上传任何扩展名的文件,从安全角度来看这是不可接受的。利用此功能缺陷,攻击者可以上传恶意网页后门,从而获得服务器的完全控制权(包括 root 权限)

缓解措施: 请在上传个人资料图片时限制其他扩展名,仅允许 .jpg 和 .png 等与图片相关的扩展名

漏洞页面 - users.php

root@kitploit:~
  // users.php
  $status = move_uploaded_file(
    $_FILES["profile_picture"]["tmp_name"],
    'user_images/' . $targetFile
  );

  if ($status) {
    try {
      $con->beginTransaction();

      $query = "INSERT INTO `users`(`display_name`,
`user_name`, `password`, `profile_picture`)
VALUES('$displayName', '$userName', '$encryptedPassword', '$targetFile');";

      $stmtUser = $con->prepare($query);
      $stmtUser->execute();

      $con->commit();

      $message = 'user registered successfully';
    } catch (PDOException $ex) {
      $con->rollback();
      echo $ex->getTraceAsString();
      echo $ex->getMessage();
      exit;
    }
  } else {
    $message = 'a problem occured in image uploading.';
  }

  header("location:congratulation.php?goto_page=users.php&message=$message");
  exit;
}

CVE-2022-40471.py 用法 -

root@kitploit:~
# 向目标机器上传一个简单的网页后门 -
python3 CVE-2022-40471.py <target_ip> <target_port> <target_uri> <username> <password>

示例 -

root@kitploit:~
python CVE-2022-40471.py 127.0.0.1 80 /pms/ UserName Password

概念验证 (PoC) -

Screenshot 2022-10-13 053055

参考资料 -

https://drive.google.com/file/d/1m-wTfOL5gY3huaSEM3YPSf98qIrkl-TW/view?usp=sharing

https://www.sourcecodester.com/php-clinics-patient-management-system-source-code

https://www.sourcecodester.com/sites/default/files/download/oretnom23/php-cpms.zip

发现与开发 -

RashidKhan Pathan (iHexCoder),2022年9月9日。 Twitter: @itRashid

下载工具