KnockOutlook: red team tool to play with Outlook
KnockOutlook
KnockOutlook is a C# project that interacts with Outlook’s COM object in order to perform a number of operations useful in red team engagements.
Operations
- checkEnumerates the Outlook installation details in order to construct the correct registry key and retrieve the Programmatic Access Security setting.
If this value is set to Warn when antivirus is inactive or out-of-date it queries WMI for any installed antivirus products and parses their current state.
- contactsEnumerates the contacts of every configured account and extracts the following information:
- Full Name
- Email Address
- mailsEnumerates the mails of every configured account and extracts the following metadata:
- ID
- Timestamp
- Subject
- From
- To
- Attachments
- searchSearches inside the mailbox of every configured account using Outlook’s built-in search engine and returns the EntryID of mails that contain the provided keyword in their body.
- saveUses Outlook’s built-in Save As a mechanism to export a mail referenced by its EntryID.
Object Model Guard Bypass
The –bypass switch can be used in conjunction with contacts, mails, search and save operations given the fact that the current process is running with high integrity level.
It will attempt to snapshot the current security policy of Outlook, patch it in a way that the Programmatic Access Security prompt is auto-allowed, and finally revert it to its initial state after the operation has finished.
Output
All operations will output basic information on the screen.
The contacts and mails operations will output results in JSON format to a Gzip compressed file.
The save operation will export the requested mail in .MSG format.
All filenames are randomly generated during runtime.
By default, Outlook’s Secure Temp Folder is used as a destination for all exported files.
Use
Download
Copyright (c) 2021, Alexandros Vavakos and Polidoros Sofikitis
All rights reserved.