Email Collection: Email Forwarding Rule

Adversaries may setup email forwarding rules to collect sensitive information. Adversaries may abuse email-forwarding rules to monitor the activities of a victim, steal information, and further gain intelligence on the victim or the victim’s organization to use as part of further exploits or operations.[1] Furthermore, email forwarding rules can allow adversaries to maintain persistent access to victim's emails even after compromised credentials are reset by administrators.[2] Most email clients allow users to create inbox rules for various email functions, including forwarding to a different recipient. These rules may be created through a local email application, a web interface, or by command-line interface. Messages can be forwarded to internal or external recipients, and there are no restrictions limiting the extent of this rule. Administrators may also create forwarding rules for user accounts with the same considerations and outcomes.[3][4]

Any user or administrator within the organization (or adversary with valid credentials) can create rules to automatically forward all received messages to another recipient, forward emails to different locations based on the sender, and more. Adversaries may also hide the rule by making use of the Microsoft Messaging API (MAPI) to modify the rule properties, making it hidden and not visible from Outlook, OWA or most Exchange Administration tools.[2]

Angreifer können E-Mail-Weiterleitungsregeln einrichten, um sensible Informationen zu sammeln. Angreifer können E-Mail-Weiterleitungsregeln missbrauchen, um die Aktivitäten eines Opfers zu überwachen, Informationen zu stehlen und weitere Informationen über das Opfer oder die Organisation des Opfers zu erlangen, die sie für weitere Angriffe oder Operationen nutzen können.(Zitat: US-CERT TA18-068A 2018) Darüber hinaus können E-Mail-Weiterleitungsregeln es Angreifern ermöglichen, den dauerhaften Zugriff auf die E-Mails des Opfers aufrechtzuerhalten, selbst nachdem kompromittierte Anmeldeinformationen von Administratoren zurückgesetzt wurden.(Zitat: Pfammatter - Hidden Inbox Rules) Die meisten E-Mail-Clients ermöglichen es Benutzern, Posteingangsregeln für verschiedene E-Mail-Funktionen zu erstellen, einschliesslich der Weiterleitung an einen anderen Empfänger. Diese Regeln können über eine lokale E-Mail-Anwendung, eine Weboberfläche oder eine Befehlszeilenschnittstelle erstellt werden. Nachrichten können an interne oder externe Empfänger weitergeleitet werden, und es gibt keine Einschränkungen, die den Umfang dieser Regel begrenzen. Administratoren können auch Weiterleitungsregeln für Benutzerkonten mit den gleichen Überlegungen und Ergebnissen erstellen.(Zitat: Microsoft Tim McMichael Exchange Mail Forwarding 2)(Zitat: Mac Forwarding Rules)

Jeder Benutzer oder Administrator innerhalb des Unternehmens (oder ein Angreifer mit gültigen Anmeldedaten) kann Regeln erstellen, um alle empfangenen Nachrichten automatisch an einen anderen Empfänger weiterzuleiten, E-Mails je nach Absender an verschiedene Orte weiterzuleiten und vieles mehr. Angreifer können die Regel auch verbergen, indem sie die Microsoft Messaging API (MAPI) verwenden, um die Regeleigenschaften zu ändern, so dass sie versteckt und von Outlook, OWA oder den meisten Exchange-Verwaltungstools nicht sichtbar ist.(Zitat: Pfammatter - Versteckte Posteingangsregeln)

Les adversaires peuvent mettre en place des règles de transfert d'e-mails pour collecter des informations sensibles. Les adversaires peuvent abuser des règles de transfert d'e-mails pour surveiller les activités d'une victime, voler des informations et obtenir des renseignements sur la victime ou l'organisation de la victime afin de les utiliser dans le cadre d'autres exploits ou opérations.(Citation : US-CERT TA18-068A 2018) De plus, les règles de transfert d'e-mails peuvent permettre aux adversaires de maintenir un accès persistant aux e-mails de la victime, même après la réinitialisation des informations d'identification compromises par les administrateurs.(Citation : Pfammatter - Hidden Inbox Rules) La plupart des clients de messagerie permettent aux utilisateurs de créer des règles de boîte de réception pour diverses fonctions de messagerie, y compris le transfert vers un destinataire différent. Ces règles peuvent être créées via une application de messagerie locale, une interface Web ou une interface de ligne de commande. Les messages peuvent être transférés à des destinataires internes ou externes, et aucune restriction ne limite l'étendue de cette règle. Les administrateurs peuvent également créer des règles de transfert pour les comptes utilisateurs avec les mêmes considérations et résultats.(Citation : Microsoft Tim McMichael Exchange Mail Forwarding 2)(Citation : Mac Forwarding Rules)

Tout utilisateur ou administrateur au sein de l'organisation (ou un adversaire disposant d'informations d'identification valides) peut créer des règles pour transférer automatiquement tous les messages reçus à un autre destinataire, transférer les e-mails à différents endroits en fonction de l'expéditeur, et plus encore. Les adversaires peuvent également masquer la règle en utilisant l'API de messagerie Microsoft (MAPI) pour modifier les propriétés de la règle, la rendant ainsi cachée et non visible depuis Outlook, OWA ou la plupart des outils d'administration d'Exchange.(Citation : Pfammatter - Règles de boîte de réception cachées)

Gli avversari possono impostare regole di inoltro email per raccogliere informazioni sensibili. Gli avversari possono abusare delle regole di inoltro email per monitorare le attività di una vittima, rubare informazioni e ottenere ulteriori informazioni sulla vittima o sull'organizzazione della vittima da usare come parte di ulteriori exploit o operazioni.(Citazione: US-CERT TA18-068A 2018) Inoltre, le regole di inoltro email possono permettere agli avversari di mantenere un accesso persistente alle email della vittima anche dopo che le credenziali compromesse vengono resettate dagli amministratori.(Citazione: Pfammatter - Hidden Inbox Rules) La maggior parte dei client email permettono agli utenti di creare regole di inbox per varie funzioni email, incluso l'inoltro a un destinatario diverso. Queste regole possono essere create attraverso un'applicazione email locale, un'interfaccia web o un'interfaccia a riga di comando. I messaggi possono essere inoltrati a destinatari interni o esterni e non ci sono restrizioni che limitano l'estensione di questa regola. Gli amministratori possono anche creare regole di inoltro per account utente con le stesse considerazioni e risultati.(Citazione: Microsoft Tim McMichael Exchange Mail Forwarding 2)(Citazione: Regole di inoltro per Mac)

Qualsiasi utente o amministratore all'interno dell'organizzazione (o avversario con credenziali valide) può creare regole per inoltrare automaticamente tutti i messaggi ricevuti ad un altro destinatario, inoltrare email a luoghi diversi in base al mittente e altro. Gli avversari possono anche nascondere la regola facendo uso di Microsoft Messaging API (MAPI) per modificare le proprietà della regola, rendendola nascosta e non visibile da Outlook, OWA o dalla maggior parte degli strumenti di amministrazione di Exchange.(Citazione: Pfammatter - Hidden Inbox Rules)

Login
ID: T1114.003
Sub-technique of:  T1114
Tactic: Collection
Platforms: Google Workspace, Linux, Office 365, Windows, macOS
Permissions Required: User
Contributors: Microsoft Security; Swetha Prabakaran, Microsoft Threat Intelligence Center (MSTIC)
Version: 1.2
Created: 19 February 2020
Last Modified: 15 October 2021
Translations:  DE FR IT EN
Provided by LAYER 8

Procedure Examples

ID Name Description
G0094 Kimsuky

Kimsuky has set auto-forward rules on victim's e-mail accounts.[5]

G0122 Silent Librarian

Silent Librarian has set up auto forwarding rules on compromised e-mail accounts.[6]

Mitigations

ID Mitigation Description
M1047 Audit

Enterprise email solutions have monitoring mechanisms that may include the ability to audit auto-forwarding rules on a regular basis.

In an Exchange environment, Administrators can use Get-InboxRule to discover and remove potentially malicious auto-forwarding rules.[3]. In addition to this, a MAPI Editor can be utilized to examine the underlying database structure and discover any modifications/tampering of the properties of auto-forwarding rules.[2]

M1042 Disable or Remove Feature or Program

Consider disabling external email forwarding.[7]

M1041 Encrypt Sensitive Information

Use of encryption provides an added layer of security to sensitive information sent over email. Encryption using public key cryptography requires the adversary to obtain the private certificate along with an encryption key to decrypt messages.

Detection

ID Data Source Data Component
DS0015 Application Log Application Log Content

Detection is challenging because all messages forwarded because of an auto-forwarding rule have the same presentation as a manually forwarded message. It is also possible for the user to not be aware of the addition of such an auto-forwarding rule and not suspect that their account has been compromised; email-forwarding rules alone will not affect the normal usage patterns or operations of the email account. This is especially true in cases with hidden auto-forwarding rules. This makes it only possible to reliably detect the existence of a hidden auto-forwarding rule by examining message tracking logs or by using a MAPI editor to notice the modified rule property values.[2]

Auto-forwarded messages generally contain specific detectable artifacts that may be present in the header; such artifacts would be platform-specific. Examples include X-MS-Exchange-Organization-AutoForwarded set to true, X-MailFwdBy and X-Forwarded-To. The forwardingSMTPAddress parameter used in a forwarding process that is managed by administrators and not by user actions. All messages for the mailbox are forwarded to the specified SMTP address. However, unlike typical client-side rules, the message does not appear as forwarded in the mailbox; it appears as if it were sent directly to the specified destination mailbox.[3] High volumes of emails that bear the X-MS-Exchange-Organization-AutoForwarded header (indicating auto-forwarding) without a corresponding number of emails that match the appearance of a forwarded message may indicate that further investigation is needed at the administrator level rather than user-level.

Die Erkennung ist schwierig, da alle Nachrichten, die aufgrund einer automatischen Weiterleitungsregel weitergeleitet werden, dieselbe Aufmachung haben wie eine manuell weitergeleitete Nachricht. Es ist auch möglich, dass der Benutzer die Hinzufügung einer solchen automatischen Weiterleitungsregel nicht bemerkt und keinen Verdacht schöpft, dass sein Konto kompromittiert wurde; E-Mail-Weiterleitungsregeln allein haben keinen Einfluss auf das normale Nutzungsverhalten oder den Betrieb des E-Mail-Kontos. Dies gilt insbesondere in Fällen mit versteckten Regeln für die automatische Weiterleitung. Daher ist es nur möglich, die Existenz einer versteckten automatischen Weiterleitungsregel zuverlässig zu erkennen, indem Sie die Protokolle der Nachrichtenverfolgung untersuchen oder einen MAPI-Editor verwenden, um die geänderten Eigenschaftswerte der Regel zu bemerken.(Zitat: Pfammatter - Hidden Inbox Rules)

Automatisch weitergeleitete Nachrichten enthalten in der Regel bestimmte erkennbare Artefakte, die in der Kopfzeile vorhanden sein können; solche Artefakte sind plattformspezifisch. Beispiele hierfür sind X-MS-Exchange-Organization-AutoForwarded auf true gesetzt, X-MailFwdBy und X-Forwarded-To. Der Parameter forwardingSMTPAddress wird in einem Weiterleitungsprozess verwendet, der von Administratoren und nicht von Benutzeraktionen verwaltet wird. Alle Nachrichten für die Mailbox werden an die angegebene SMTP-Adresse weitergeleitet. Im Gegensatz zu typischen clientseitigen Regeln wird die Nachricht im Postfach jedoch nicht als weitergeleitet angezeigt, sondern so, als ob sie direkt an das angegebene Zielpostfach gesendet worden wäre.(Zitat: Microsoft Tim McMichael Exchange Mail Forwarding 2) Eine grosse Anzahl von E-Mails, die den Header X-MS-Exchange-Organization-AutoForwarded tragen (was auf eine automatische Weiterleitung hinweist), ohne eine entsprechende Anzahl von E-Mails, die dem Erscheinungsbild einer weitergeleiteten Nachricht entsprechen, kann darauf hindeuten, dass weitere Untersuchungen auf Administratorenebene und nicht auf Benutzerebene erforderlich sind.

La détection est difficile car tous les messages transférés en raison d'une règle de transfert automatique ont la même présentation qu'un message transféré manuellement. Il est également possible que l'utilisateur ne soit pas conscient de l'ajout d'une telle règle de transfert automatique et ne soupçonne pas que son compte a été compromis ; les règles de transfert automatique n'affecteront pas à elles seules les schémas d'utilisation ou les opérations normales du compte de messagerie. Ceci est particulièrement vrai dans le cas de règles de transfert automatique cachées. Il n'est donc possible de détecter de manière fiable l'existence d'une règle de transfert automatique cachée qu'en examinant les journaux de suivi des messages ou en utilisant un éditeur MAPI pour remarquer les valeurs modifiées des propriétés de la règle.(Citation : Pfammatter - Hidden Inbox Rules)

Les messages auto-transférés contiennent généralement des artefacts détectables spécifiques qui peuvent être présents dans l'en-tête ; ces artefacts seraient spécifiques à la plate-forme. Les exemples incluent X-MS-Exchange-Organization-AutoForwarded réglé sur true, X-MailFwdBy et X-Forwarded-To. Le paramètre forwardingSMTPAddress utilisé dans un processus de transfert qui est géré par les administrateurs et non par les actions des utilisateurs. Tous les messages de la boîte aux lettres sont transférés à l'adresse SMTP spécifiée. Cependant, contrairement aux règles typiques côté client, le message n'apparaît pas comme transféré dans la boîte aux lettres ; il apparaît comme s'il avait été envoyé directement à la boîte aux lettres de destination spécifiée. (Citation : Microsoft Tim McMichael Exchange Mail Forwarding 2) Des volumes élevés de courriels qui portent l'en-tête X-MS-Exchange-Organization-AutoForwarded (indiquant un transfert automatique) sans un nombre correspondant de courriels qui correspondent à l'apparence d'un message transféré peuvent indiquer qu'une enquête plus approfondie est nécessaire au niveau de l'administrateur plutôt qu'au niveau de l'utilisateur.

Il rilevamento è difficile perché tutti i messaggi inoltrati a causa di una regola di inoltro automatico hanno la stessa presentazione di un messaggio inoltrato manualmente. È anche possibile che l'utente non sia consapevole dell'aggiunta di tale regola di inoltro automatico e non sospetti che il suo account sia stato compromesso; le regole di inoltro automatico da sole non influiscono sui normali modelli d'uso o operazioni dell'account di posta elettronica. Questo è particolarmente vero nei casi con regole di auto-forwarding nascoste. Questo rende possibile rilevare in modo affidabile l'esistenza di una regola di auto-forwarding nascosta solo esaminando i log di tracciamento dei messaggi o usando un editor MAPI per notare i valori di proprietà della regola modificati.(Citazione: Pfammatter - Hidden Inbox Rules)

I messaggi auto-forwarded generalmente contengono artefatti specifici rilevabili che possono essere presenti nell'intestazione; tali artefatti sarebbero specifici della piattaforma. Gli esempi includono X-MS-Exchange-Organization-AutoForwarded impostato su true, X-MailFwdBy e X-Forwarded-To. Il parametro forwardingSMTPAddress usato in un processo di inoltro gestito da amministratori e non da azioni dell'utente. Tutti i messaggi per la casella di posta vengono inoltrati all'indirizzo SMTP specificato. Tuttavia, a differenza delle tipiche regole lato client, il messaggio non appare come inoltrato nella mailbox; appare come se fosse stato inviato direttamente alla mailbox di destinazione specificata.(Citazione: Microsoft Tim McMichael Exchange Mail Forwarding 2) Alti volumi di email che portano l'intestazione X-MS-Exchange-Organization-AutoForwarded (che indica l'inoltro automatico) senza un numero corrispondente di email che corrispondono all'aspetto di un messaggio inoltrato possono indicare che sono necessarie ulteriori indagini a livello di amministratore piuttosto che di utente.

References