T07 · Tool Hijacking and Spoofing
- Location
recalc.py:20- Finding
Unsafe Persistent Installation and Reuse of a Global LibreOffice Macro
- Content
View full analysis
Sub RecalculateAndSave() ThisComponent.calculateAll() ThisComponent.store() ThisComponent.close(True) End Sub ''' try: with open(macro_file, 'w') as f: f.write(macro_content) return True except Exception: return False ``` The resulting global macro is subsequently invoked as follows: ```python cmd = [ 'soffice', '--headless', '--norestore', 'vnd.sun.star.script:Standard.Module1.RecalculateAndSave?language=Basic&location=application', abs_path ] ``` ### Technical Analysis The script installs `Module1.xba` in LibreOffice's persistent per-user profile instead of creating an isol ...[truncated 2692 chars]- Remediation
View remediation
