T06 · System Persistence
- Location
recalc.py:17- Finding
Persistent LibreOffice Macro Installation Can Overwrite Existing User Macros
- 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 ``` ### Technical Analysis The recalculation utility writes an application-level macro into the current user's persistent LibreOffice profile. On Linux, the destination is `~/.config/libreoffice/4/user/basic/Standard/Module1.xba`; on macOS, it is under `~/Library/Application Support/LibreOffice/4/user/basic/Standard`. The file is retained after the script exits and is consequently available to future ...[truncated 2620 chars]- Remediation
View remediation
