Skip to content

Instantly share code, notes, and snippets.

View Crazor's full-sized avatar

Crazor Crazor

  • Germany
  • 09:27 (UTC +02:00)
View GitHub Profile
@ARMdealer
ARMdealer / MacOSInject.cxx
Created March 15, 2024 08:52 — forked from Brandon-T/MacOSInject.cxx
ARM64 Injection on MacOS M1
#include <thread>
#include <utility>
#include <cstdint>
#include <string>
#include <sys/types.h>
class Injector
{
public:
static bool Inject(std::string module_path, std::int32_t pid, void* bootstrap) noexcept;
@vocaeq
vocaeq / inject.c
Last active August 21, 2024 20:22 — forked from knightsc/inject.c
An example of how to inject code to call dlopen and load a dylib into a remote mach task. Tested on 12.5 M1 Pro.
#include <dlfcn.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <mach/mach.h>
#include <mach/error.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/sysctl.h>
#include <sys/mman.h>