Kali Linux

KnockOutlook : A Little Tool To Play With Outlook

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.

Command Line Usage

_ _ _ _ _ _ / /// / // _ _ / // / _ / /_ / ,< / _ \/ _ \/ / /// / / / / / / / / \/ _ \/ ///
/ /| |/ / / / // / // ,< / // / // / // / // / // / ,< // |// //__/___//_\___/__,/_//___/____/_/_\
Parameters:
–operation : specify the operation to run
–keyword : specify a keyword for the ‘search’ operation
–id : specify an EntryID for the ‘save’ operation
–bypass : bypass the Programmatic Access Security settings (requires admin)
Operations:
check : perform a number of checks to ensure operational security
contacts : extract all contacts of every account
mails : extract mailbox metadata of every account
search : search for the provided keyword in every mailbox
save : save a specified mail by its EntryID
Examples:
KnockOutlook.exe –operation check
KnockOutlook.exe –operation contacts
KnockOutlook.exe –operation mails –bypass
KnockOutlook.exe –operation search –keyword password
KnockOutlook.exe –operation save –id {EntryID} –bypass

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 mechanism to export a mail referenced by its EntryID.

Object Model Guard Bypass

The --bypass switch can be used in conjunction with contactsmailssearch 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 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.

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

6 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

6 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

2 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago