My next class:
Reverse-Engineering Malware: Advanced Code AnalysisOnline | Greenwich Mean TimeOct 28th - Nov 1st 2024

Be careful with RPMSG files

Published: 2022-01-31. Last Updated: 2022-01-31 11:36:49 UTC
by Xavier Mertens (Version: 1)
2 comment(s)

Not many people are aware of “.rpmsg” files. The file extension means “restricted-permission message”. They are used to deliver email messages between people and implement some controls applied at the recipient side. Such permissions are, by example, the right to forward or copy the original email. You may compare this to some kind of “DRM” (Digital Rights Management) for emails. RPMSG files are used inside a Microsoft ecosystem because they are created by users of Azure Information Protection, or Active Directory Rights Management Services[1]. The file is encrypted and only the recipient will be able to decrypt and open the message.

The good news for users, this is pretty transparent because Outlook will automatically open RPMSG files for you and display it. The are delivered as attachment with the following MIME type:

Content-Type: application/x-microsoft-rpmsg-message

I was aware of phishing campaigns that implement this type of file to deliver malicious content to the victim. Because RPMSG files are handled by Microsoft tools, the sender of the email must have a valid Microsoft account and be able to send messages to the potential victim. This means that such attacks are targeted and imply the use of a compromised account.

I did a retro-hunt on virustotal.com and searched for files containing this MIME-type and found 819 matches across the last 90 days. Most files were dump of email messages. 

Why use RPMSG files? Probably to defeat most of the classic security controls and make the email trusted. The phishing content is stored inside the protected message. If you don't use RPMSG with 3rd party organizations on a regular basis, it could be interesting to have a look at such kind of messages...

[1] https://docs.microsoft.com/en-us/azure/information-protection/rms-client/client-view-use-files#messagerpmsg-as-an-email-attachment

Xavier Mertens (@xme)
Xameco
Senior ISC Handler - Freelance Cyber Security Consultant
PGP Key

2 comment(s)
My next class:
Reverse-Engineering Malware: Advanced Code AnalysisOnline | Greenwich Mean TimeOct 28th - Nov 1st 2024

Comments

Sorry in advance for a probably dumb question, but what query did you use at VirusTotal for the retrohunt for the rpmsg stuff, please? Good article, btw.
A simple YARA rule:

rule hunt_20220127_rpmsg
{
strings:
$s1 = "Content-Type: application/x-microsoft-rpmsg-message" nocase wide ascii
condition:
all of ($s*)
}

Diary Archives