File Security 101 – Threats Beyond Malware

OLE Package: The Attachment Inside the Document: How an RTF Puts a Program on Your Disk

Nov 27, 2026, 9:58:13 AM by Joerg Schneider-Simon

An email can carry no executable at all and still leave one on your disk: packed inside a document as hexadecimal text, and unpacked by Windows when the document opens. This is episode 15 of File Security 101, our series on file-based threats your anti-malware does not see.

The video explains it in about two minutes.
The article adds the details and the research behind it.

An RTF file, no attachment

The mail has one attachment, an RTF file. Mail gateways often block executables and scripts by type; an RTF document passes. Word opens it and shows a short letter. Somewhere in the text sits a small icon that looks like a PDF, and the letter asks the reader to open it.

OLE Package: a file in a wrapper

RTF is a text format, and it can embed objects from other applications through OLE (Object Linking and Embedding). An embedded object is written as an \object group with the control word \objemb, a class name in {\*\objclass ...} and the object's data in {\*\objdata ...}, encoded as hexadecimal text. The data begins with an OLE 1.0 header that repeats the class name.

The class Package is the simplest of all: a wrapper around an arbitrary file. It stores the file's content, its name, a path and an icon. When the document is displayed, the object appears as that icon. The Windows component Packager (packager.dll) unpacks and opens the file.

The attack: Word writes the file

The attacker packs a program into a Package object and gives it a name that looks harmless, for example Invoice.pdf.exe, with a PDF icon. The document needs no macro and no exploit. In 2014, McAfee researcher Haifei Li reported that merely opening such an RTF dropped the embedded file into the user's temporary folder, with a file name and content the RTF controls, on Windows 7 and 8, and even in WordPad. The file was removed when the document closed (McAfee). While the document is open, the program sits on disk, and a double-click on the icon starts it. A file at a predictable path is also useful to other exploits, which then only need to run it.

It happened

  • Sandworm, 2014. On October 14, 2014, iSIGHT Partners and Microsoft disclosed a Windows zero-day used by the group they named Sandworm against NATO, governments of EU countries and Ukraine, and energy and telecommunications firms (Virus Bulletin). The lure was a PowerPoint slide show with two embedded OLE objects that referenced remote files: the BlackEnergy trojan disguised as a GIF image, and an INF setup file that renamed and executed it (Zscaler). The Packager objects dropped the files into the temp folder (McAfee). The flaw, CVE-2014-4114, is in CISA's Known Exploited Vulnerabilities catalog.
  • The bypass, 2014. Microsoft's first fix marked dropped files as coming from the internet. Researchers showed that other actions on the dropped file still ran code without a warning; the follow-up flaw, CVE-2014-6352, was exploited in October 2014 with a crafted PowerPoint document and is also in the KEV catalog. According to McAfee's testing, the file drop itself remained after the second fix.

Why it slips through

The packaged program is malware, so why does it get through? It never crosses the gateway as a file. It travels as hexadecimal text inside an object inside a document. To find it, a filter must parse the RTF, decode every object and recognize the Package format, and RTF parsers differ in what malformed input they accept. Only Packager turns the text back into a program, on the user's computer, after every check at the gateway has passed.

What to do

  • Never double-click an icon inside a document, even if it looks like a PDF or a picture.
  • If your organization does not need RTF, block it in Word's File Block settings (entry "RTF files").
  • Keep Windows and Office updated. Microsoft changed Packager's behavior through security updates such as MS14-060 and MS14-064.

bowbridge Content Disarm and Reconstruct removes the whole \object group from an RTF: the Package data, the file it carries and the icon reference. The rebuilt document keeps its text; no file is extracted to disk. A document whose only purpose is an embedded object loses that object, because the file it carries is the attack.

Join the bowbridge CDR beta program

Sources

Subscribe to upcoming episodes