Skip to main content

Tool to purge and remove all macro and dynamic content from an MS Office file

Project description

DocuBleach

DocuBleach

A command-line tool designed to detect and purge any and all macros and dynamic content from commonly used office document formats (including MS Office Files, PDFs, etc.).

Super-Linter Unit Tests

Supported formats

Word

  • .docx: Word Document
  • .doc: Word Document (1997 - 2007)
  • .docm: Word Document with Macros
  • .dotx: Word Template
  • .dotm: Word Template with Macros

PowerPoint

  • .pptx: PowerPoint Presentation
  • .pptm: PowerPoint Presentation with Macros
  • .potx: PowerPoint Template
  • .potm: PowerPoint Template with Macros
  • .ppsx: PowerPoint Show
  • .ppsm: PowerPoint Show with Macros

Excel

  • .xlsx: Excel Spreadsheet
  • .xls: Excel Spreadsheet (1997 - 2007)
  • .xlsm: Excel Spreadsheet with Macros
  • .xltx: Excel Template
  • .xltm: Excel Template with Macros

Planned formats

  • .ppt: PowerPoint Presentation (1997 - 2007)
  • .pdf: Portable Document File

Problem

VBA and OLE content in MS Office files can, and have sometimes been made to, act as vehicles for malware delivery.

Microsoft has previously attempted to protect users from macros by disabling them by default. However, anybody is able to enable macros in an MS Office file before sending them on to a potential victim.

This Python tool aims to detect and remove any of this potentially malicious content from given files.

Solution

A command-line program written in modern Python (3.10+) that is capable of locating and removing macros and dynamic content from a variety of files.

It should support all the common Office Open XML formats, 'legacy' MS binary files, and PDFs.

Usage

This package has not yet been published. It can be used, however, by cloning the repo, opening the command prompt in it, and running the following commands:

  1. poetry install
  2. poetry run docubleach <PATH_TO_FILE>

The optional '-c' flag may be appended to the final command to enable notification if any macros are detected.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docubleach-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

docubleach-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file docubleach-0.1.0.tar.gz.

File metadata

  • Download URL: docubleach-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Windows/11

File hashes

Hashes for docubleach-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5612519125a2e45cc5d836d93a31212187f4e4e507db0bfa2df47785a35e9d48
MD5 6ae39a7a86c07c48889c03d1c56bfb79
BLAKE2b-256 7641724c6d1a299d7e499f0afe3d86568e5117bfe04d641e3e963e5d4cb50e6a

See more details on using hashes here.

File details

Details for the file docubleach-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: docubleach-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Windows/11

File hashes

Hashes for docubleach-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3bcde3b30a2519eab0104027e6daac336af924a7ff22e70cfb0724a1f73c6743
MD5 742cb94b14b9d839ffa7008739308a3d
BLAKE2b-256 ed6c03c3aa89fe42cbc3a8ed68af1a1eff8289f98b2f1e4ee4ea63bebe99cd63

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page