Elastic Defend high stable eql

Windows Socket Creation from Unbacked Memory

Identifies the creation of a Windows network socket from unbacked memory, this may indicate process code injection.

View Source

Detection Logic

api where process.Ext.api.name == "VirtualProtect" and
 process.Ext.api.metadata.target_address_name == "mswsock.dll" and
 process.thread.Ext.call_stack_summary in ("ntdll.dll
| apphelp.dll
| ntdll.dll
| kernelbase.dll
| ws2_32.dll
| Unbacked",
                                           "ntdll.dll
| wow64.dll
| wow64cpu.dll
| wow64.dll
| ntdll.dll
| apphelp.dll
| ntdll.dll
| kernelbase.dll
| ws2_32.dll
| Unbacked") and
 _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info like "Unbacked*" and $entry.callsite_trailing_bytes : "?*") and
 _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info : "c:\\windows\\sys?????\\ws2_32.dll!WSASocket*") and
 not process.thread.Ext.call_stack_final_user_module.protection_provenance_path like ("c:\\windows\\microsoft.net\\framework64\\v*\\clr.dll", "c:\\program files\\dotnet\\shared\\microsoft.netcore.app\\*\\coreclr.dll") and 
 not _arraysearch(process.thread.Ext.call_stack_final_user_module.code_signature,
                  $entry, $entry.subject_name: ("Essential Objects, Inc.", "COLONY LABS, INC.", "GN Hearing A/S", "OCBASE", "ocbase.com", "Netwrix Corporation", "MPS Monitor Srl", 
                                                "TRANSACT CAMPUS, LLC", "Enclave Networks Limited", "Ashampoo GmbH & Co. KG", "IC SOLUTIONS sp. z o. o.", ".NET") and $entry.status == "trusted")

Field Validations

Loading…

Comments (0)

Loading comments...