Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 2eb5b2a846791635…

MALICIOUS

Office (OOXML)

22.2 KB Created: 2021-05-13 10:27:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-05-22
MD5: 31ac247b5c3eebf68c989e22756fbc0d SHA-1: 605974b4b9c89ecbac65fd79a9a3ebfe411ab881 SHA-256: 2eb5b2a846791635522b8e5e65d0f3780675a8a0cdfff75a49a703ba5c681fd7
230 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The sample is an OOXML document containing a VBA macro with an AutoOpen subroutine. The macro decodes a string using custom functions and concatenates it with other strings to form a path that appears to be a registry run key: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\IAccessible2Proxy. This suggests the macro is intended to establish persistence. The overall goal is likely to download and execute a second-stage payload, as indicated by the ClamAV detection and the presence of obfuscated code.

Heuristics 6

  • ClamAV: Doc.Malware.Valyria-10010644-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Malware.Valyria-10010644-0
  • VBA project inside OOXML medium 3 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas In document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2014/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2015/9/8/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2015/10/21/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/9/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/10/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/11/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/12/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/13/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/14/chartexIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/markup-compatibility/2006In document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/inkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2017/model3dIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2012/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2018/wordml/cexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2016/wordml/cidIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2018/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahashIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2015/wordml/symexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2006/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeIn document text (OOXML body / shared strings)

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 1482 bytes
SHA-256: 85f44fd1bf494dc2f0b6495c777712e251f78c73dde4dca274a7f44fe4d56b73
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "NewMacros"
Function Biscuit(Bite)
    Biscuit = Chr(Bite - 17)
End Function

Function Crunchy(Meat)
    Crunchy = Left(Meat, 3)
End Function

Function Bone(Throw)
    Bone = Right(Throw, Len(Throw) - 3)
End Function

Function Feed(Milk)
    Do
        Can = Can + Biscuit(Crunchy(Milk))
        Milk = Bone(Milk)
    Loop While Len(Milk) > 0
    Feed = Can
End Function

Function GoodNight(seconds As Integer)
    Dim now As Long
    now = Timer()
    Do
        DoEvents
    Loop While (Timer < now + seconds)
End Function

Function SignDocument()
    Dim Mario, Luigi, Donkey, Kong As String
    GoodNight (5)
    Donkey = Environ$(Feed("082097097085082101082"))
    Kong = Donkey + Feed("109094122116131128132128119133109104122127117128136132109100133114131133049094118127134109097131128120131114126132109")
    Mario = Kong + Feed("100133114131133102129")
    Luigi = Kong + "Wario"
    Name Mario As Luigi
    GoodNight (3)
    Name Luigi As Mario
End Function


Function MyMacro()
If ActiveDocument.Name <> "MyMacro.docm" Then
    Exit Function
End If

SignDocument
End Function

Sub AutoOpen()
    MyMacro
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 25600 bytes
SHA-256: be1ee812c7bf430e4333c26c3c6c5b9710ad0ae978454d6920cc577247795121
Detection
ClamAV: Doc.Malware.Valyria-10010644-0
Obfuscation or payload: unlikely