Ensure that you have "Trust access to the VBA project object model" checked under Trust Center -> Macro Settings
To use module, first import-module .\adb.psm1
this will import two functions
- ListAdversaries
- CreateDocument
ListAdversaries
will list the adversaries that are available to emulate
CreateDocument
will create the document(s) based on the adversary chosen
PS C:\Users\ebfe\Desktop\adb> ListAdversaries
Name
----
test1
test2
test3
The CreateDocument
function takes 3 parameters
c
- this is the requested number of documents to be created (NOT required)adversary
- this is the requested adversary to emulate (REQUIRED)out
- this is the output directory to drop all of the requested files. default operation is to drop the files into$PSScriptRoot
. ifout
is specified and the directory does not exist, it will be created (NOT required)pass
- password you'd like to set on the document (NOT required)
PS C:\Users\ebfe\Desktop\adb> CreateDocument -c 1 -adversary test1
[*] Creating 1 documents...
PS C:\Users\ebfe\Desktop\adb> CreateDocument -c 5 -adversary test12
[*] Creating 5 documents...
PS C:\Users\ebfe\Desktop\adb> CreateDocument -c 5 -adversary test3 -out C:\Users\ebfe\Desktop\out
[*] Creating 5 documents...
[*] Specified output directory does NOT exist
[+] Creating 'C:\Users\ebfe\Desktop\out' now...
PS C:\Users\ebfe\Desktop\adb> CreateDocument -c 1 -adversary test1 -pass 'password'
[*] Creating '1' document(s)...
[!] Log does not exist
[+] Creating log file now...
[*] Created 'C:\Users\ebfe\Desktop\adb\Your_Invoice_4331.docm'...
Ensure that the adversary directory is populated with a Doc1.docx
or Book1.xlsx
. This file is used as the template during the document creation process.