Blog | G5 Cyber Security

Outlook Email From Field: Code Execution Risk

TL;DR

Yes, code can be executed from a carefully crafted Outlook email’s ‘From’ field, especially if your Outlook settings automatically run scripts or macros. This is because the ‘From’ address can sometimes be used to trigger actions within Outlook. We’ll show you how this works and, more importantly, how to protect yourself.

Understanding the Risk

Outlook isn’t designed to directly execute code from the ‘From’ field in a typical sense (like running a Python script). However, vulnerabilities exist where malicious actors can exploit how Outlook handles email addresses and associated data. The main risks come from:

How an Attack Might Work

While complex, here’s a simplified example of how someone might try to exploit this:

  1. Crafting a Malicious Email: An attacker creates an email with a ‘From’ address designed to trigger a vulnerability. This could involve unusual characters or specific formatting.
  2. Exploiting Auto-Execution: If Outlook is configured to automatically process certain types of emails (e.g., running scripts based on sender information), the malicious ‘From’ field might initiate unwanted actions.
  3. Bypassing Security: The attacker may attempt to bypass security warnings by using techniques like obfuscation or social engineering.

Protecting Yourself – Step-by-Step Guide

Here’s how to significantly reduce the risk of code execution from Outlook email ‘From’ fields:

1. Disable Automatic Script Execution

  1. Open Trust Center Settings: In Outlook, go to File > Options. Then click Trust Center and then Trust Center Settings…
  2. Disable Scripts: In the Trust Center, select Macro Settings. Choose either:
    • Disable all macros without notification (most secure).
    • Disable all macros with notification (you’ll be prompted before a macro runs – be very cautious!).
  3. Disable Scripting: In the Trust Center, select Trust Center > Object Model Macro Security. Uncheck ‘Allow trusted locations to access VBA project object model’.

2. Review and Manage Add-ins

  1. Open COM Add-ins: In Outlook, go to File > Options > Add-ins.
  2. Manage Add-ins: At the bottom of the window, select ‘COM Add-ins’ from the ‘Manage:’ dropdown and click ‘Go…’.
  3. Disable Unnecessary Add-ins: Carefully review the list of add-ins. Disable any that you don’t recognize or no longer need. Be especially wary of add-ins from unknown sources.

3. Configure Safe Senders and Blocked Senders Lists

  1. Junk Email Options: Go to Home > Junk > Junk E-mail Options…
  2. Blocked Senders List: Add any suspicious email addresses or domains to the ‘Blocked Senders’ list.
  3. Safe Senders List: Only add trusted senders to the ‘Safe Senders’ list. Avoid adding entire domains unless absolutely necessary.

4. Keep Outlook Updated

Microsoft regularly releases security updates for Outlook. Make sure you have automatic updates enabled or manually check for and install updates frequently.

5. Be Cautious with Unknown Senders

Never open attachments or click links from senders you don’t trust, even if the email appears legitimate. Hover over links to see where they actually lead before clicking.

6. Consider Using a More Secure Email Client

Some email clients offer better security features and more granular control over script execution than Outlook. Research alternative options if you’re particularly concerned about security.

Exit mobile version