Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 511af99b16fce5b2…

MALICIOUS

Office (OLE)

192.5 KB Created: 2020-01-22 16:15:00 Authoring application: Microsoft Office Word First seen: 2020-04-06
MD5: 714908373fddb50eb21a35ca46ad6761 SHA-1: eb840e6925455b9dc3243a94c7be931f669b80e1 SHA-256: 511af99b16fce5b2fd07e08c8f90671b83589913aa642b115743467a4e561143
204 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059 Command and Scripting Interpreter T1204.002 Malicious File

The sample is a Microsoft Office document containing heavily obfuscated VBA macros. The presence of a 'Document_Open' macro and 'CreateObject' calls, along with an obfuscated auto-exec loader, strongly suggests malicious intent. The VBA macro 'macros.bas' is the primary artifact, likely responsible for executing a secondary payload, although the specific download URL is not directly evident in the provided script excerpt.

Heuristics 7

  • VBA macros detected medium 4 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • 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.
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open 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.
  • Suspicious extracted artifact info 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.
  • 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 https://www.office-forums.com/threads/need-inverse-of-rgb-r-g-b.1886634/ In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 142379 bytes
SHA-256: 92954b96aaf9a894783a22e3e1fe4ce98dd64a0898981c894dbe30cc6cb2e8bd
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 2 long base64-like blob(s).
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
#If Win64 Then
Private Declare PtrSafe Function WideCharToMultiByte Lib "kernel32" (ByVal CodePage As LongPtr, ByVal dwFlags As LongPtr, ByVal lpWideCharStr As LongPtr, ByVal cchWideChar As LongPtr, lpMultiByteStr As Any, ByVal cchMultiByte As LongPtr, ByVal lpDefaultChar As LongPtr, ByVal lpUsedDefaultChar As LongPtr) As LongPtr
Private Declare PtrSafe Function MultiByteToWideChar Lib "kernel32" (ByVal CodePage As LongPtr, ByVal dwFlags As LongPtr, lpMultiByteStr As Any, ByVal cchMultiByte As LongPtr, ByVal lpWideCharStr As LongPtr, ByVal cchWideChar As LongPtr) As Long
#Else
Private Declare Function WideCharToMultiByte Lib "kernel32" (ByVal CodePage As Long, ByVal dwFlags As Long, ByVal lpWideCharStr As Long, ByVal cchWideChar As Long, lpMultiByteStr As Any, ByVal cchMultiByte As Long, ByVal lpDefaultChar As Long, ByVal lpUsedDefaultChar As Long) As Long
Private Declare Function MultiByteToWideChar Lib "kernel32" (ByVal CodePage As Long, ByVal dwFlags As Long, lpMultiByteStr As Any, ByVal cchMultiByte As Long, ByVal lpWideCharStr As Long, ByVal cchWideChar As Long) As Long

#End If
 

 
 Dim BhyeKo As Variant
 Dim GreFvcAc As Variant
 
 Sub IMPRESSAO()

' MACRO para imprimir 2 formularios A5 frente e verso em uma folha A4
' Esta configurado para imprimir 60 formulario frente e verso em 30 folhas de A4
' Utilizei imprimi com o PDF Creator para unir todas as paginas e depois imprimir o arquivo

Dim StartNumber, Meio, TempNumber, TempAnswer As Integer
StartNumber = Range("AR3").value + 1 'para continuar a numeracao de onde parou

Do
  
  TempAnswer = MsgBox("Vao ser impressas " & (StartNumber + 60) - StartNumber & _
  " folhas! OK?", vbYesNoCancel, "Confirmar numeros...")

    Select Case TempAnswer
        Case vbCancel
            Exit Sub
        Case vbYes
            Exit Do
    End Select
Loop
 
  For TempNumber = StartNumber To (StartNumber + 29)
      ActiveWorkbook.Sheets("FRENTE").Range("T3").value = TempNumber
      ActiveWorkbook.Sheets("FRENTE").Range("AR3").value = TempNumber + 30
      ActiveWorkbook.Sheets("FRENTE").PrintOut
      ActiveWorkbook.Sheets("VERSO").PrintOut
  Next TempNumber

End Sub


Sub AUX_clean_shapes()
    ''AUX delete all shapes
    Dim shp As Shape
    For Each shp In ActiveSheet.Shapes
        shp.Delete
        'shp.Select
    Next
End Sub

Sub create_wb_map()
    Sheets_to_boxes
    add_dependency_arrows_to_boxes 2
End Sub

Sub Sheets_to_boxes()
    ''Creates a text box for every worksheet of the current Workbook in the activesheet

    Dim n As Integer, oldStatusBar
    Dim i As Integer, t As Integer
    Dim l As Integer
    Dim Colour As Long, prevColour As Long
    Dim ThemeColour As Long, prevThemeColour As Long
    Dim boxw As Integer, maxw As Integer
    Dim xsht As Worksheet

    i = 0
    Const TxtSize = 10
    l = (Cells(1, 1).Width * 1.5)

    n = 1
    oldStatusBar = Application.DisplayStatusBar
    Application.DisplayStatusBar = True

    Set xsht = ActiveSheet

    For Each xsht In ActiveWorkbook.Sheets
    
        Application.StatusBar = n & "/" & ActiveWorkbook.Sheets.count & "   " & xsht.name
    
        Colour = xsht.Tab.Color
        'TODO: Fix default Colour
        If Colour = 0 Then Colour = 15132390     '= RGB(230, 230, 230) 'default
        'Every Colour change advances one column and resets the row counter
    
        ThemeColour = xsht.Tab.ThemeColor
        If (ThemeColour <> prevThemeColour) Then
            i = 0
            l = l + (maxw + TxtSize * 3)         'increasing variable with
            maxw = 0
        End If
    
        prevColour = Colour
        prevThemeColour = ThemeColour
    
        t = (Cells(1, 1).Height * 4.5) + (TxtSize * 2 + TxtSize) * i

       
... (truncated)