UtilDebugShellCodeExecute Method

Executes a specified ShellCode byte array by copying it to pinned memory, modifying the memory permissions with VirtualProtect function, and executing using a Action delegate.

Note that you can generate a hex string / byte array of ASM code at: https://defuse.ca/online-x86-assembler.htm

Definition

Namespace: DevCase.Core.Diagnostics.Debugging.Common
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool ShellCodeExecute(
	byte[] shellCode,
	bool throwOnError
)

Parameters

shellCode  Byte

[Missing <param name="shellCode"/> documentation for "M:DevCase.Core.Diagnostics.Debugging.Common.UtilDebug.ShellCodeExecute(System.Byte[],System.Boolean)"]

throwOnError  Boolean
If and a error occurs during execution, an exception will be thrown.

Return Value

Boolean
if execution succeeds, otherwise.

Remarks

Based upon code written by Matt Nelson (@enigma0x3) and Matt Graeber (@mattifestation).

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also