Skip to content

Beakerboy/MS-OVBA-Crypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coverage Status Build Status

MS-OVBA-Crypto

Cryptographic Functions for Office Visual Basic files.

Installation

Use the package manager pip to install MS_OVBA_Compression.

pip install ms_ovba_crypto

Usage

Microsoft VBA files use a custom encryption algorithm to obfuscate visibility and permission fields. The clsid is used as a seed.

import ms_ovba_crypto

data = b'\x00\x00\x00\x00',

clsid = '{9E394C0B-697E-4AEE-9FA6-446F51FB30DC}'
# Random numbers are used in the obfuscation, so the output is not deterministic.
encrypted = ms_ovba_crypto.encrypt(clsid, data)

data = b'\x41\x43\x5A\x5A\x5E\x5A\x5E\x5A\x5E\x5A\x5E'

# returns b'\x00\x00\x00\x00'
ms_ovba_crypto.decrypt(data)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Cryptographic Functions for Office Visual Basic files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages