All Projects → Pepitoh → Vbad

Pepitoh / Vbad

Licence: mit
VBA Obfuscation Tools combined with an MS office document generator

Programming Languages

python
139335 projects - #7 most used programming language
vba
158 projects

Projects that are alternatives of or similar to Vbad

Encryption
Encryption is a simple way to encrypt and decrypt strings on Android and Java project.
Stars: ✭ 324 (-19.6%)
Mutual labels:  encryption
Kissme
Kissme: Kotlin Secure Storage Multiplatform
Stars: ✭ 351 (-12.9%)
Mutual labels:  encryption
Raasnet
Open-Source Ransomware As A Service for Linux, MacOS and Windows
Stars: ✭ 371 (-7.94%)
Mutual labels:  encryption
Sshy
HTML5 SSH Web Client
Stars: ✭ 334 (-17.12%)
Mutual labels:  encryption
Buttercup Desktop
Buttercup is a free, open-source and cross-platform password manager, built on NodeJS with Typescript. It uses strong industry-standard encryption to protect your passwords and credentials (among other data you store in Buttercup vaults) at rest, within vault files (.bcup). Vaults can be loaded from and saved to a number of sources, such as the local filesystem, Dropbox, Google Drive or any WebDAV-enabled service (like ownCloud or Nextcloud ¹).
Stars: ✭ 3,714 (+821.59%)
Mutual labels:  encryption
Laravel Hashid
Obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.
Stars: ✭ 354 (-12.16%)
Mutual labels:  encryption
Purse
GPG asymmetric (YubiKey) password manager
Stars: ✭ 313 (-22.33%)
Mutual labels:  encryption
Ockam
End-to-end encrypted messaging and mutual authentication between cloud and edge-device applications
Stars: ✭ 395 (-1.99%)
Mutual labels:  encryption
Felony
🔑🔥📈 Next Level PGP
Stars: ✭ 3,478 (+763.03%)
Mutual labels:  encryption
Rxfingerprint
Android Fingerprint authentication and encryption with RxJava
Stars: ✭ 373 (-7.44%)
Mutual labels:  encryption
Gojot
A command-line journal that is distributed and encrypted, making it easy to jot notes 📓
Stars: ✭ 340 (-15.63%)
Mutual labels:  encryption
Gonnacry
A Linux Ransomware
Stars: ✭ 341 (-15.38%)
Mutual labels:  encryption
Constellation
Peer-to-peer encrypted message exchange
Stars: ✭ 365 (-9.43%)
Mutual labels:  encryption
Secure Storage Android
Store strings & credentials securely encrypted on your device
Stars: ✭ 333 (-17.37%)
Mutual labels:  encryption
Libzip
A C library for reading, creating, and modifying zip archives.
Stars: ✭ 379 (-5.96%)
Mutual labels:  encryption
Nxcrypt
NXcrypt - 'python backdoor' framework
Stars: ✭ 316 (-21.59%)
Mutual labels:  encryption
Qtox
qTox is a chat, voice, video, and file transfer IM client using the encrypted peer-to-peer Tox protocol.
Stars: ✭ 3,843 (+853.6%)
Mutual labels:  encryption
Sharpyshell
SharPyShell - tiny and obfuscated ASP.NET webshell for C# web applications
Stars: ✭ 402 (-0.25%)
Mutual labels:  encryption
Hawk
✔️ Secure, simple key-value storage for Android
Stars: ✭ 3,827 (+849.63%)
Mutual labels:  encryption
Cingulata
Cingulata (pronounced "tchingulata") is a compiler toolchain and RTE for running C++ programs over encrypted data by means of fully homomorphic encryption techniques.
Stars: ✭ 369 (-8.44%)
Mutual labels:  encryption

VBad

VBad is fully customizable VBA Obfuscation Tool combined with an MS Office document generator. It aims to help Red & Blue team for attack or defense.

DISCLAIMER: This is only for testing purposes and can only be used where strict consent has been given. Do not use this for illegal purposes, period.

Please read the LICENSE under readme/LICENSE for the licensing of VBad.

alt tag

Features

VBad is a tool that allows you to obfuscate (and encrypted) in many diffrent ways pieces of VBA code and integrated directly into a list of generated MS Office document. You would be able to :

  • Encrypt all strings present in your VBA code;
  • Encrypt data from your python Script in VBA code (domain names or paths for example);
  • Randomize each functions' (or variables) names that you want;
  • Delete all tabulation/spaces/cariage return
  • Chose Encryption method, how and where encryption keys are stored;
  • Add customizable fake keys (to avoid some easy detection stuff)
  • Generate as many unique MS Office document (with different randomize in the VBA) as you want using a filename list and a document Template;
  • Enable autodestruction of encryption Keys feature once the VBA has been trigger once;
  • 20/10/16 : fake keys implementation on #VBad to avoid some easy detection stuff
  • 07/04/17 : implementing option that allows exploiting this vulnerability: http://seclists.org/fulldisclosure/2017/Mar/90. VBad is now able to destroy references to the module containing effecitve payload in order to make it invisible from VBA Developper Tool making analyses and debugging much more harder :-)

How it works

For the moment, only one type of encryption is supported.

All strings and indicated variables are encrypted (xored in fact) using a random key (different for each files). This key is stored into Document.Variables by the python program and then initialization (not the variable itself) is deleted from the VBA code.

It makes decryption of the code harder because analysts has to get back this Document.Variable key using specific methods (no classic tools will work with this).

For more fun, this keys are deleted once the macro is triggered one time (as long as the file is open from a writable place).

New storage methods and real encryption algorithms are to come. But, remember it's VBA, we do not have so many choices. :-).

Prerequisites

  • Office (Excel/Word) for generated final doc (tested with Office 2010 and 2013) with Macro fully activated and checkbox "Trust Access to the VBA project object model" checked (in macro security settings, it allows python code to change and create macro)
  • Python 2.7
  • win32com

How to use

First of all, you need to markdown your orignal VBA to indicate the script what you want to obfuscate/randomize or not :

  • All VBA strings are encrypted by default. Moreover, you can exclude encryption of one string by adding an exclude mark ([!!]) at the end of the string. Example :
String_Encrypted = "This string will be encrypted"
String_Not_Encrypted = "This string will NOT be encrypted[!!]"
  • Mark [rdm::x] before a variable or function name will randomize it with a x chars string, Example :
Function [rdm::10]Test()  '=> Test() will become randomized with a 10 characters string
[rdm::4]String_1 = "Test"  '=> String_1 wil lbecome randomized with a 4 characters string
  • Mark [var::var_name] will included the string string_to_hide('var_name') from const.py in a encrypted way in the VBA. With that, you can generate string from your python file and include it directly in your VBA (DGA codding for example).
Path_to_save_exe = [var::path] '=> string_to_hide("path") will be encrypted and put in the final VBA

Git clone and customize const.py to fit your need, you have to indicate at least :

template_file = r"C:\tmp\Vbad\Example\Template\template.doc" # The path to the template Office document you want to use to generate your files
filename_list = r"C:\tmp\Vbad\Example\Lists\filename_list.txt" #The path to the file that contains a list of different filenames you want to use for your generated files
path_gen_files = r"C:\tmp\Vbad\Example\Results" # Path where your generated Office documents will be saved
original_vba_file = r"C:\tmp\Vbad\Example\Orignal_VBA\original_vba.vbs" # The orignal VBA file you want to include, randomize and obfuscate in your malicious documents
trigger_function_name =  "Test" # Function that you want to auto_trigger (in your original_vba_file)
string_to_hide = {"domain_name":"http://www.test.com", "path_to_save":r"C:\tmp\toto"} #Strings that you want to add in your 

Example

In Example folder, you will find an already marked vba file, a template.doc, a list of 3 filename. You can use it and adapt it as you need.

TODO :

  • Other encryption methods
  • Other key hiding methods
  • .xls generation (thx @DPeltier)
  • .docx and .xlsx generation

Feel free to contribute :-)

Pepitoh.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].