MCPcopy Create free account

hub / github.com/Cobalt-Strike/sleepmask-vs / functions

Functions87 in github.com/Cobalt-Strike/sleepmask-vs

↓ 36 callersFunctionDumpApiEntry
* A helper function to display the contents of a SYSCALL_API_ENTRY structure. * * @param name A pointer to a char* containing (human readable) target
sleepmask-vs/library/debug.cpp:111
↓ 17 callersFunctionPrepareSyscall
* Sets the globals currentJmpAddr/SysNum to target sys call. * * Note: This is inspired by RecycledGate: * https://github.com/thefLink/RecycledGate/bl
sleepmask-vs/library/indirectsyscalls.cpp:116
↓ 14 callersFunction_memset
* Move a specified byte into a memory location * * @param ptr A pointer to the destination buffer * @param byte The byte to copy into memory * @param
sleepmask-vs/library/stdlib.cpp:30
↓ 4 callersFunctionBeaconGateWrapper
* A wrapper around BeaconGate to handle masking/unmasking Beacon * * @param info A pointer to a BEACON_INFO structure * @param gateFunction A pointer
sleepmask-vs/library/gate.cpp:17
↓ 4 callersFunctionFindGadget
* Find a specific byte pattern (gadget) in a module's .text section. * * Note: We search the .text section to make sure the gadget is RX. * * @param m
sleepmask-vs/library/retaddrspoofing.cpp:20
↓ 3 callersFunctionCalculateFunctionStackSizeWrapper
* Wrapper for calculating the stack size for a given function. * * @param returnAddress The target return address to calculate the stack size for.
sleepmask-vs/library/stackspoofing.cpp:275
↓ 3 callersFunctionDumpRtlEntry
* A helper function to display the contents of a RTL_API structure. * * @param name A pointer to a char* containing (human readable) target function n
sleepmask-vs/library/debug.cpp:121
↓ 3 callersFunctionMaskBeacon
* Mask Beacon * * @param beaconInfo A pointer to the BEACON_INFO structure */
sleepmask-vs/library/masking.cpp:17
↓ 3 callersFunctionPrintBeaconGateInfo
* A helper function to display the contents of a FUNCTION_CALL structure. * * @param entry A pointer to a FUNCTION_CALL structure. */
sleepmask-vs/library/debug.cpp:98
↓ 3 callersFunctionPrintSleepMaskInfo
* A helper function to display the contents of the SLEEPMASK_INFO structure. * * @param info A pointer to a SLEEPMASK_INFO structure. */
sleepmask-vs/library/debug.cpp:26
↓ 3 callersFunctionTestSysCallApi
* Unit test runner which will ensure that all sys calls * are behaving as expected with whatever technique is * implemented in *-sleepmask.cpp. */
sleepmask-vs/unit-tests/syscallapi-unit-tests.cpp:51
↓ 3 callersFunctionUnMaskBeacon
* UnMask Beacon * * @param beaconInfo A pointer to the BEACON_INFO structure */
sleepmask-vs/library/masking.cpp:28
↓ 2 callersFunctionBeaconGate
* Execute BeaconGate. * * @param gateFunction A pointer to a FUNCTION_CALL structure */
sleepmask-vs/library/gate.cpp:36
↓ 2 callersFunctionDripProtectSection
sleepmask-vs/library/masking.cpp:71
↓ 2 callersFunctionNtAllocateVirtualMemoryWrapper
* VirtualAllocEx --> NtAllocateVirtualMemory * * arg[0] [in] HANDLE hProcess --> [0] [in] HANDLE ProcessHandle * arg[1] [in] LPVOID lpAddre
sleepmask-vs/library/syscallapi.cpp:81
↓ 2 callersFunctionNtCreateThreadExWrapper
* CreateRemoteThread --> NtCreateThreadEx * * --> [0] [out] PHANDLE ThreadHandle *
sleepmask-vs/library/syscallapi.cpp:255
↓ 2 callersFunctionNtProtectVirtualMemoryWrapper
* VirtualProtectEx --> NtProtectVirtualMemory * * arg[0] HANDLE hProcess --> HANDLE ProcessHandle * arg[1] LPVOID lpAdress --> PVO
sleepmask-vs/library/syscallapi.cpp:128
↓ 2 callersFunctionTestArgumentsArePassedCorrectlyWrapper
Test function wrapper to ensure that asm harnesses correctly pass up to 10 arguments.
sleepmask-vs/unit-tests/syscallapi-unit-tests.cpp:21
↓ 2 callersFunctionXORBeacon
* XOR Beacon's Sections/Heap Records * * @param beaconInfo A pointer to the BEACON_INFO structure * @param mask A Boolean value to indicate whether to
sleepmask-vs/library/masking.cpp:40
↓ 2 callersFunctionXORData
* XOR the provided buffer with the provided key * * @param buffer The buffer to XOR * @param size The size of the buffer * @param key The key to XOR t
sleepmask-vs/library/masking.cpp:195
↓ 2 callersFunction_NtResumeThread
sleepmask-vs/library/indirectsyscalls.cpp:79
↓ 2 callersFunction_memcmp
* A function to compare two memory blocks * * @param ptr1 A pointer to the destination buffer * @param ptr2 A pointer to the source buffer * @para
sleepmask-vs/library/stdlib.cpp:46
↓ 1 callersFunctionCalculateFunctionStackSize
* Calculates the stack size for a given function. * * @param pRuntimeFunction A pointer to a RUNTIME_FUNCTION structure. * @param imageBase A dword
sleepmask-vs/library/stackspoofing.cpp:195
↓ 1 callersFunctionDraugrGate
* Execute DraugrGate. * * @param draugrCall A pointer to a DRAUGR_FUNCTION_CALL structure. */
sleepmask-vs/library/stackspoofing.cpp:22
↓ 1 callersFunctionDraugrGateWrapper
* A wrapper around DraugrGate to handle masking/unmasking Beacon. * * @param info A pointer to a SLEEPMASK_INFO structure. * @param draugrCall A po
sleepmask-vs/library/stackspoofing.cpp:85
↓ 1 callersFunctionDraugrSpoofStub
* Asm stub for performing draugr call stack spoofing. * * @param (...) accepts variadic args. * @return A PVOID containing return value. */
sleepmask-vs/library/stackspoofing.cpp:403
↓ 1 callersFunctionFindGadget
* Find a gadget to use for call stack spoofing. * * Note: This function has been optimized from the original * to only find gadgets once. * * @pa
sleepmask-vs/library/stackspoofing.cpp:148
↓ 1 callersFunctionFindGadgets
* Find the specified gadgets and store them for future use. * * @param A pointer to a GADGETS structure. * * @return BOOL indicating success. */
sleepmask-vs/library/retaddrspoofing.cpp:66
↓ 1 callersFunctionFindRegionByPurpose
* Find a specific region within the ALLOCATED_MEMORY structure * * @param allocatedMemory A pointer to a ALLOCATED_MEMORY structure * @param purpose
sleepmask-vs/library/utils.cpp:19
↓ 1 callersFunctionGetTextSectionSize
* Retrieve size of text section. * * @param pModule A pointer to target module. * @param pdwVirtualAddress [out] A pointer to start of target modul
sleepmask-vs/library/stackspoofing.cpp:115
↓ 1 callersFunctionInitFrameInfo
* Initialise the fake stack frame. * * @param stackFrame A pointer to a SYNTHETIC_STACK_FRAME structure. * @return A BOOL indicating success. */
sleepmask-vs/library/stackspoofing.cpp:301
↓ 1 callersFunctionInitializeDraugr
* Configures Draugr for use in BeaconGate. * * @param A pointer* to a DRAUGR_FUNCTION_CALL structure. */
sleepmask-vs/draugr-sleepmask.cpp:44
↓ 1 callersFunctionInitializeSysCalls
* Configures system calls for use in BeaconGate. * * @param A pointer to a BEACON_SYSCALLS structure. */
sleepmask-vs/library/utils.cpp:33
↓ 1 callersFunctionIsWritable
* Check if memory protection is writable * @param dwProtection The current memory protection constant * @return A Boolean value to indicate it is writ
sleepmask-vs/library/masking.cpp:60
↓ 1 callersFunctionNtCloseWrapper
* CloseHandle --> NtClose * * arg[0] HANDLE hObject --> [0] [in] HANDLE Handle */
sleepmask-vs/library/syscallapi.cpp:364
↓ 1 callersFunctionNtCreateSectionWrapper
* CreateFileMappingA --> NtCreateSection * * --> [0] [out] PHANDLE Sectio
sleepmask-vs/library/syscallapi.cpp:391
↓ 1 callersFunctionNtDuplicateObjectWrapper
* DuplicateHandle --> NtDuplicateObject * * arg[0] [in] HANDLE hSourceProcessHandle --> [0] [in] HANDLE SourceProcessHandle * arg[1] [in]
sleepmask-vs/library/syscallapi.cpp:522
↓ 1 callersFunctionNtFreeVirtualMemoryWrapper
* VirtualFree --> NtFreeVirtualMemory * * --> HANDLE ProcessHandle * arg[0] LPVOID lpAddress --> PVOID *BaseAddress *
sleepmask-vs/library/syscallapi.cpp:162
↓ 1 callersFunctionNtGetContextThreadWrapper
* GetThreadContext --> NtGetContextThread * * arg[0] [in] HANDLE hThread --> [0] [in] HANDLE ThreadHandle * arg[1] [in, out] LPCONTE
sleepmask-vs/library/syscallapi.cpp:183
↓ 1 callersFunctionNtMapViewOfSectionWrapper
* MapViewOfFile --> NtMapViewOfSection * * arg[0] [in] HANDLE fileMappingObject --> [0] [in] HANDLE SectionHandle *
sleepmask-vs/library/syscallapi.cpp:442
↓ 1 callersFunctionNtOpenProcessWrapper
* OpenProcess --> NtOpenProcess * * --> [0] [out] PHANDLE ProcessHandle * arg[0] [in] DWORD dwDesiredAccess --
sleepmask-vs/library/syscallapi.cpp:303
↓ 1 callersFunctionNtOpenThreadWrapper
* OpenThread --> NtOpenThread * * --> [0] [out] PHANDLE ThreadHandle * arg[0] [in] DWORD dwDesiredAccess --> [1]
sleepmask-vs/library/syscallapi.cpp:335
↓ 1 callersFunctionNtQueryVirtualMemoryWrapper
* VirtualQuery --> NtQueryVirtualMemory * * --> [0] [in] HANDLE ProcessHandle * arg[0] [in] LPC
sleepmask-vs/library/syscallapi.cpp:496
↓ 1 callersFunctionNtReadProcessMemoryWrapper
* ReadProcessMemory--> NtReadVirtualMemory * * arg[0] [in] HANDLE hProcess --> [0] [in] HANDLE ProcessHandle * arg[1] [in] LP
sleepmask-vs/library/syscallapi.cpp:544
↓ 1 callersFunctionNtResumeThreadWrapper
* ResumeThread --> NtResumeThread * * arg[0] [in] HANDLE hThread --> [0] [in] HANDLE ThreadHandle * --> [1] [out] P
sleepmask-vs/library/syscallapi.cpp:219
↓ 1 callersFunctionNtSetContextThreadWrapper
* SetThreadContext --> NtSetContextThread * * arg[0] [in] HANDLE hThread --> [0] [in] HANDLE ThreadHandle * arg[1] [in] CONTEXT *lpContext
sleepmask-vs/library/syscallapi.cpp:201
↓ 1 callersFunctionNtUnmapViewOfSectionWrapper
* UnmapViewOfFile --> NtUnmapViewOfSection * * --> [in] HANDLE ProcessHandle * arg[0] [in] LPCVOID lpBase Add
sleepmask-vs/library/syscallapi.cpp:472
↓ 1 callersFunctionNtWriteProcessMemoryWrapper
* WriteProcessMemory --> NtWriteProcessMemory * * arg[0] [in] HANDLE hProcess --> [0] [in] HANDLE ProcessHandle * arg[1] [
sleepmask-vs/library/syscallapi.cpp:565
↓ 1 callersFunctionPrintSyscallInfo
* A helper function to display the contents of a BEACON_SYSCALLS structure. * * @param entry A pointer to a BEACON_SYSCALLS structure. */
sleepmask-vs/library/debug.cpp:130
↓ 1 callersFunctionSetupFunctionCall
* Set the required gadget before ret address spoofing. * * Note: Here we ensure that a call to a function in WinINet will * return to WinINet.dll and
sleepmask-vs/library/retaddrspoofing.cpp:124
↓ 1 callersFunctionSysCallDispatcher
* The sys call interface layer between Beacon -> BeaconGate. * Routes higher level API (e.g. VirtualAlloc) to its Nt equivalent (e.g. NtAllocateVirtua
sleepmask-vs/library/syscallapi.cpp:15
↓ 1 callersFunctionXORHeapRecords
* XOR Heap Records * * @param beaconInfo A pointer to the BEACON_INFO structure */
sleepmask-vs/library/masking.cpp:176
↓ 1 callersFunctionXORSections
* XOR the sections in the provided memory region * * @param allocatedRegion A pointer to a ALLOCATED_MEMORY_REGION structure * @param maskKey A pointe
sleepmask-vs/library/masking.cpp:96
↓ 1 callersFunction_NtAllocateVirtualMemory
Memory management APIs.
sleepmask-vs/library/indirectsyscalls.cpp:18
↓ 1 callersFunction_NtClose
sleepmask-vs/library/indirectsyscalls.cpp:95
↓ 1 callersFunction_NtCreateSection
sleepmask-vs/library/indirectsyscalls.cpp:38
↓ 1 callersFunction_NtCreateThreadEx
Thread APIs.
sleepmask-vs/library/indirectsyscalls.cpp:64
↓ 1 callersFunction_NtDuplicateObject
sleepmask-vs/library/indirectsyscalls.cpp:100
↓ 1 callersFunction_NtFreeVirtualMemory
sleepmask-vs/library/indirectsyscalls.cpp:28
↓ 1 callersFunction_NtGetContextThread
sleepmask-vs/library/indirectsyscalls.cpp:69
↓ 1 callersFunction_NtMapViewOfSection
sleepmask-vs/library/indirectsyscalls.cpp:43
↓ 1 callersFunction_NtOpenProcess
Handle APIs.
sleepmask-vs/library/indirectsyscalls.cpp:85
↓ 1 callersFunction_NtOpenThread
sleepmask-vs/library/indirectsyscalls.cpp:90
↓ 1 callersFunction_NtProtectVirtualMemory
sleepmask-vs/library/indirectsyscalls.cpp:23
↓ 1 callersFunction_NtQueryVirtualMemory
sleepmask-vs/library/indirectsyscalls.cpp:33
↓ 1 callersFunction_NtReadVirtualMemory
sleepmask-vs/library/indirectsyscalls.cpp:53
↓ 1 callersFunction_NtSetContextThread
sleepmask-vs/library/indirectsyscalls.cpp:74
↓ 1 callersFunction_NtUnmapViewOfSection
sleepmask-vs/library/indirectsyscalls.cpp:48
↓ 1 callersFunction_NtWriteVirtualMemory
sleepmask-vs/library/indirectsyscalls.cpp:58
FunctionDoIndirectSyscallx86
sleepmask-vs/library/indirectsyscalls.cpp:167
FunctionPrintAllocatedMemoryRegion
* A helper function to display the contents of a ALLOCATED_MEMORY_REGION structure. * * @param memoryRegion A pointer to a ALLOCATED_MEMORY_REGION str
sleepmask-vs/library/debug.cpp:44
FunctionSpoofCall
* Spoofs the call stack for a target function. * * Note: The fake call stack could be cached to avoid re-calculating it for each function call. *
sleepmask-vs/library/stackspoofing.cpp:340
FunctionSpoofReturnAddressx64
This attribute ensures the compiler generates code without prolog / epilog code. Note: This attribute causes an intellisense error as it cannot parse
sleepmask-vs/library/retaddrspoofing.cpp:159
FunctionSpoofReturnAddressx86
sleepmask-vs/library/retaddrspoofing.cpp:195
FunctionTestArgumentsArePassedCorrectly
Test function to ensure that asm harnesses correctly pass up to 10 arguments.
sleepmask-vs/unit-tests/syscallapi-unit-tests.cpp:7
Function_memcpy
* Copy memory from one location to another * * @param dest A pointer to the destination buffer * @param src A pointer to the source buffer * @param si
sleepmask-vs/library/stdlib.cpp:11
Functiondlog
sleepmask-vs/library/debug.cpp:12
Functiongo
sleepmask-vs/unit-test-bof.cpp:40
Functionmain
sleepmask-vs/unit-test-bof.cpp:408
Functionmain
sleepmask-vs/retaddrspoofing-sleepmask.cpp:96
Functionmain
sleepmask-vs/indirectsyscalls-sleepmask.cpp:81
Functionmain
sleepmask-vs/default-sleepmask.cpp:41
Functionmain
sleepmask-vs/draugr-sleepmask.cpp:107
Functionsleep_mask
* Sleepmask-VS entry point * * Note: To enable logging for Release builds set ENABLE_LOGGING to * 1 in debug.h. */
sleepmask-vs/retaddrspoofing-sleepmask.cpp:45
Functionsleep_mask
* Sleepmask-VS entry point * * Note: To enable logging for Release builds set ENABLE_LOGGING to * 1 in debug.h. */
sleepmask-vs/indirectsyscalls-sleepmask.cpp:44
Functionsleep_mask
* Sleepmask-VS entry point * * Note: To enable logging for Release builds set ENABLE_LOGGING to * 1 in debug.h. */
sleepmask-vs/default-sleepmask.cpp:33
Functionsleep_mask
* Sleepmask-VS entry point * * Note: To enable logging for Release builds set ENABLE_LOGGING to * 1 in debug.h. */
sleepmask-vs/draugr-sleepmask.cpp:69