Rapid7 Vulnerability & Exploit Database

LibreOffice Macro Python Code Execution

Back to Search

LibreOffice Macro Python Code Execution

Disclosed
07/16/2019
Created
08/20/2019

Description

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.

Author(s)

  • Nils Emmerich
  • Shelby Pace
  • LoadLow
  • Gabriel Masei

Platform

Python

Architectures

python

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/fileformat/libreoffice_logo_exec
msf exploit(libreoffice_logo_exec) > show targets
    ...targets...
msf exploit(libreoffice_logo_exec) > set TARGET < target-id >
msf exploit(libreoffice_logo_exec) > show options
    ...show and set options...
msf exploit(libreoffice_logo_exec) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;