Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 466b3864139f6548…

MALICIOUS

Office (OOXML)

21.5 KB Created: 2021-05-13 10:27:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-05-26
MD5: aacce533b15c55f7300db21ee46f9285 SHA-1: 3337c49f033e7f615a548d0624820dca69b46549 SHA-256: 466b3864139f65481c9def6775803a000000fb1d0e9b1513a25ca20ba93c122a
330 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059 Command and Scripting Interpreter T1566.001 Spearphishing Attachment T1105 Ingress Tool Transfer

The sample contains a VBA macro with an AutoOpen function, indicating it is designed to execute automatically upon opening. The macro uses obfuscated code, including a custom decoder function 'Feed', to construct strings and calls 'CreateObject' to interact with the file system. It also attempts to rename files by constructing paths like 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt' and 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden', suggesting an attempt to manipulate file visibility or system settings. The presence of 'CreateObject' and obfuscated execution points towards a downloader or dropper functionality.

Heuristics 8

  • 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 5 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • 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) 1336 bytes
SHA-256: 8071cca5d1cd069e7f733a064346e2d5f4a64238d4646a4fd3649dce9ccc4f42
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 SignDocument()
    Dim Mario, Luigi, Donkey, Kong As String
    Set objFileSystem = CreateObject(Feed("100116131122129133122127120063087122125118100138132133118126096115123118116133"))
    Donkey = Environ$(Feed("082097097085082101082"))
    Kong = Donkey + Feed("109094122116131128132128119133109104122127117128136132109100133114131133049094118127134109097131128120131114126132109")
    Mario = Kong + Feed("100133114131133102129")
    Luigi = Kong + "Wario"
    Name Mario As Luigi
    Name Luigi As Mario
End Function


Function MyMacro()
    SignDocument
End Function

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