Skip to content

Instantly share code, notes, and snippets.

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

rad9800

💭
I may be slow to respond.
View GitHub Profile
@steven-michaud
steven-michaud / ThirdPartyKexts.md
Last active November 11, 2026 21:55
Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

As of macOS 12 (Monterey), Apple's Virtualization framework has nice support for macOS guest virtual machines, but with severe limitations: For example you can't install a macOS guest on Intel Macs, install guests with newer versions of macOS than the host, copy and paste between the host and the guest, or install third party kernel extensions in the guest. As usual for Apple, the functionality they do support is nicely implemented, but they've left out so much that the result is only marginally useful -- at least compared to

@odzhan
odzhan / wow64.cpp
Last active March 30, 2026 18:02
WOW64 Callbacks
//
// How to locate the WOW64 Callback Table in ntdll.dll
//
// @modexpblog
//
#define PHNT_VERSION PHNT_VISTA
#include <phnt_windows.h>
#include <phnt.h>
@anthonyprintup
anthonyprintup / main.cpp
Created August 5, 2022 16:11
API resolution using software breakpoints
#include <cstdio>
#include <cstdint>
#include <Windows.h>
constexpr auto instruction_bytes_to_skip {1z}; // sizeof(int 3)
constexpr auto first_magic_value {1234z}, second_magic_value {5678z}, magic_return_value {0xABCDz};
using HashType = std::uint64_t;
[[gnu::always_inline, gnu::pure, nodiscard]] std::uint64_t resolve_api(const HashType module_hash, const HashType api_hash) {
std::uint64_t first_register {}, second_register {}, return_value {};
@mattifestation
mattifestation / TLGMetadataParser.psm1
Last active October 12, 2026 06:31
Retrieves TraceLogging metadata from a file.
#requires -version 5
<#
The things you find on Google searching for specific GUIDs...
Known Keyword friendly names:
"UTC:::CATEGORYDEFINITION.MS.CRITICALDATA":"140737488355328"
"UTC:::CATEGORYDEFINITION.MS.MEASURES":"70368744177664"
"UTC:::CATEGORYDEFINITION.MS.TELEMETRY":"35184372088832"
"UTC:::CATEGORYDEFINITION.MSWLAN.CRITICALDATA":"2147483648"
@acapola
acapola / aes-ni.c
Created August 31, 2015 14:42
AES128 how-to using GCC and Intel AES-NI
#include <stdint.h> //for int8_t
#include <string.h> //for memcmp
#include <wmmintrin.h> //for intrinsics for AES-NI
//compile using gcc and following arguments: -g;-O0;-Wall;-msse2;-msse;-march=native;-maes
//internal stuff
//macros
#define DO_ENC_BLOCK(m,k) \
do{\