code-branch"Hello World" Guide

Forensics · Харуул Занги U18: 2018 · w01f

Problem

It seemed that we're given a Microsoft Word 2007+ file. Download by click down below.

file-download
83KB

After opening the file, I didn't find anything particularly interesting to analyze at first glance. The document appeared straightforward with no immediate signs of hidden content or suspicious activity. However, I suspected that there might be something more to uncover beneath the surface. This led me to think that we might need a specialized tool to analyze the file further and extract any hidden figures, macros, or other embedded objects that could be lurking inside the .docm format.

oledump.py is a Python tool used to analyze and extract content from OLE (Object Linking and Embedding) files, such as Microsoft Office documents (.doc, .docx, .xls, .ppt, etc.)

Access it through herearrow-up-right.

After identifying that there might be hidden content within the file, I decided to use oledump.py to extract and analyze the different streams from the .docm file. Here's how I proceeded:

  1. Initial Analysis with oledump.py:

    I ran the command python3 oledump.py haruulzangi.docm to inspect the embedded streams in the .docm file. The output revealed the following streams:

    ┌──(zwique㉿kali)-[~/Downloads]
    └─$ python3 oledump.py haruulzangi.docm 
    A: word/vbaProject.bin
     A1:       405 'PROJECT'
     A2:        71 'PROJECTwm'
     A3: M    2502 'VBA/NewMacros'
     A4: m     938 'VBA/ThisDocument'
     A5:      2728 'VBA/_VBA_PROJECT'
     A6:       569 'VBA/dir'
  • The streams labeled A3 and A4 looked interesting, especially given that stream A3 had the name 'VBA/NewMacros', suggesting it might contain macros or other code that could be worth investigating.

  1. Extracting Stream A4 (ThisDocument):

I first decided to extract stream A4, which corresponds to 'VBA/ThisDocument'. To do this, I ran the following command:

After extracting it, I used the strings command to search for readable content within the binary file:

Nothing to find

  1. Extracting Stream A3 (NewMacros):

I then shifted my focus to stream A3, labeled 'VBA/NewMacros', as it might contain more significant data. I ran the following command:

Decoding the base64 string at the top will give you the flag.

Last updated