Skip to content

Instantly share code, notes, and snippets.

View TheBarret's full-sized avatar
💭
I may be slow to respond.

Barret TheBarret

💭
I may be slow to respond.
  • Private
View GitHub Profile
@TheBarret
TheBarret / ByteArrayExtensions.vb
Created October 28, 2017 14:34
Useful Byte Array Extensions
Imports System.IO
Imports System.IO.Compression
Imports System.Security.Cryptography
Imports System.Runtime.InteropServices
Public Module TypeExt
<System.Runtime.CompilerServices.Extension>
Public Function QuickCast(Of T)(src As Byte()) As Object
Dim dataPtr As IntPtr = IntPtr.Zero
Try
If src.Length <> 0 Then
@TheBarret
TheBarret / Suscall.cs
Created August 3, 2021 23:20 — forked from dr4k0nia/Suscall.cs
An example of using x64 syscall shellcode to call NtProtectVirtualMemory
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Code_Projects
{
public unsafe class Suscall
{
[DllImport("kernel32", SetLastError = true)]