bookboons

All PDF Details And All in one Detail like Improve Your Knowledge

Tuesday, August 29, 2023

[New post] Quickpost: Analysis of PDF/ActiveMime Polyglot Maldocs

Site logo image Didier Stevens posted: " jpcert reported a new type of maldoc: "MalDoc in PDF - Detection bypass by embedding a malicious Word file into a PDF file –". These maldocs are PDF files that embed a Word document (ActiveMime) in MIME format. ActiveMime documents can be analyzed " Didier Stevens

Quickpost: Analysis of PDF/ActiveMime Polyglot Maldocs

Didier Stevens

Aug 29

jpcert reported a new type of maldoc: "MalDoc in PDF - Detection bypass by embedding a malicious Word file into a PDF file –".

These maldocs are PDF files that embed a Word document (ActiveMime) in MIME format.

ActiveMime documents can be analyzed by combining my emldump.py tool and oledump.py.

ActiveMime documents were heavily obfuscated in the past, and this is also the case here. As emldump.py version 0.0.11 was only able to handle the obfuscation of 2 of the 3 samples mentioned by jpcert, I released a new version to handle more obfuscation.

Here is an analysis example for sample 5b677d297fb862c2d223973697479ee53a91d03073b14556f421b3d74f136b9d.

Run emldump (version 0.0.12 or later) with option -F to fix the obfuscation of the mime-version header:

To find the part where the ActiveMime file was hidden, use option -E %HEADASCII% to view the first 20 characters of each part:

Here we can see that part 14 is not a JPEG file, but an ActiveMime file.

We extract it and pipe it into oledump.py:

That ActiveMime file contains VBA code:

These maldocs (at least the 3 samples shared by jpcert) can be detected by pdfid with option -e to display extra information:

There are a lot of bytes outside streams (usually for PDFs, there shouldn't be) and the count of stream and endstream documents is different.

But like I said, these are detections for these 3 samples, it's possible to modify those samples to remove the anomalies.


Quickpost info


Comment
Tip icon image You can also reply to this email to leave a comment.

Unsubscribe to no longer receive posts from Didier Stevens.
Change your email settings at manage subscriptions.

Trouble clicking? Copy and paste this URL into your browser:
http://blog.didierstevens.com/2023/08/29/quickpost-analysis-of-pdf-activemime-polyglot-maldocs/

WordPress.com and Jetpack Logos

Get the Jetpack app to use Reader anywhere, anytime

Follow your favorite sites, save posts to read later, and get real-time notifications for likes and comments.

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com on Twitter WordPress.com on Facebook WordPress.com on Instagram WordPress.com on YouTube
WordPress.com Logo and Wordmark title=

Automattic, Inc. - 60 29th St. #343, San Francisco, CA 94110  

at August 29, 2023
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

What Makes Modern Dark Fiction So Haunting? Discover the Power of Rhetoric

What makes a gothic corridor feel so haunting—even with no one there? In our latest Ritual Blog feature, we explore how setting and rhetoric...

  • The Book Of Clarence (2024) Film Review
    ...
  • New & Noteworthy J-pop of the Week (June 30, 2024)
    In connection with my desire to fully keep up with the J-pop industry, I'm p...
  • Ordinary Angels (2024) Film Review
    A struggling hairdresser finds a renewed sense of purpose when she meets a widow...

Search This Blog

  • Home

About Me

bookboons
View my complete profile

Report Abuse

Blog Archive

  • July 2025 (2)
  • June 2025 (4)
  • May 2025 (4)
  • April 2025 (5)
  • March 2025 (5)
  • February 2025 (4)
  • January 2025 (6)
  • December 2024 (3)
  • November 2024 (4)
  • October 2024 (1)
  • August 2024 (2405)
  • July 2024 (2925)
  • June 2024 (2960)
  • May 2024 (3057)
  • April 2024 (2967)
  • March 2024 (3077)
  • February 2024 (2890)
  • January 2024 (3023)
  • December 2023 (2680)
  • November 2023 (2216)
  • October 2023 (1706)
  • September 2023 (1319)
  • August 2023 (1194)
  • July 2023 (1113)
  • June 2023 (1201)
  • May 2023 (2369)
  • April 2023 (2849)
  • March 2023 (1637)
  • February 2023 (1153)
  • January 2023 (1234)
  • December 2022 (1086)
  • November 2022 (1005)
  • October 2022 (809)
  • September 2022 (649)
  • August 2022 (778)
  • July 2022 (763)
  • June 2022 (759)
  • May 2022 (802)
  • April 2022 (779)
  • March 2022 (593)
  • February 2022 (493)
  • January 2022 (697)
  • December 2021 (1568)
  • November 2021 (3175)
  • October 2021 (3250)
  • September 2021 (3142)
  • August 2021 (3265)
  • July 2021 (3227)
  • June 2021 (2032)
Powered by Blogger.