Attackers Embed Malicious Word Files into PDFs to Bypass Detection

In a recent cybersecurity development, attackers have been using a novel technique to evade detection by embedding malicious Microsoft Word files within PDF documents.

This method, dubbed “MalDoc in PDF,” allows attackers to bypass traditional security measures by exploiting the file structure of PDFs.

JPCERT/CC, a Japanese cybersecurity organization, has detailed this technique and its implications for malware detection.

Overview of MalDoc in PDF

The MalDoc in PDF technique involves creating a file that appears as a PDF but can be opened in Microsoft Word.

This is achieved by appending a malicious Word file, often in the form of an MHT file with macros, to the end of a PDF file.

Dump view of MalDoc in PDF

When opened in Word, the embedded macros can execute malicious code, potentially leading to unauthorized access or data breaches.

Notably, these files are often saved with a .doc extension, which, if set to open in Word by default on Windows systems, can automatically trigger the malicious behavior.

Detection Challenges

One of the significant challenges posed by MalDoc in PDF is its ability to evade detection by standard PDF analysis tools.

Tools like pdfid may fail to identify the malicious components embedded within the PDF structure, as they primarily focus on analyzing the PDF-specific parts of the file.

Malicious Word Files
pdfid’s analysis results

Moreover, since these files are recognized as PDFs, they may not be flagged by antivirus software or sandbox environments that typically scrutinize executable or Word files more closely.

To combat this technique, security analysts recommend using tools specifically designed for analyzing Word files, such as OLEVBA.

This tool can extract and analyze embedded macros, helping identify potential threats.

OLEVBA’s analysis results

Additionally, creating detection rules using frameworks like Yara can help flag suspicious files that contain both PDF and Word file signatures.

For instance, a Yara rule can be crafted to alert users if an Excel or Word file is embedded within a PDF, prompting caution before opening such files.

In conclusion, the MalDoc in PDF technique highlights the evolving nature of cyber threats and the need for adaptive security measures.

While it does not bypass Word’s macro execution settings, it underscores the importance of vigilance when handling files with mixed formats and the potential for malicious code execution.

Users and security professionals must remain cautious and utilize specialized tools to detect and mitigate such threats effectively.

Also Read:

Mandvi
Mandvi
Mandvi is a Security Reporter covering data breaches, malware, cyberattacks, data leaks, and more at Cyber Press.

Recent Articles

Related Stories

LEAVE A REPLY

Please enter your comment!
Please enter your name here