Skip to content

Instantly share code, notes, and snippets.

View HarDToBelieve's full-sized avatar
🏠
Working from home

Đỗ Minh Tuấn HarDToBelieve

🏠
Working from home
View GitHub Profile
@yrp604
yrp604 / xnu-syscall-life-amd64.md
Last active October 2, 2023 15:59
The life of an XNU unix syscall on amd64

XNU syscall path

Chart

             +------------------+
             |These push their  |                                  +-----------------------+
             |respective syscall|                                  |This overwrites the    |
             |dispatch functions|                                  |saved dispatch function|
             |onto the stack    |                                  |with hndl_alltraps     |
@cheesecakeufo
cheesecakeufo / xpc_idapro.py
Last active April 20, 2023 13:59
xpc functions fix - IDA
# Created to make RE-ing XPC a bit easier (in a shitty way)
# yes, somethings are hard-coded but I've done it because I don't want to spend more time on this
# created by Abraham Masri @cheesecakeufo
import re
import idaapi
import idautils
paths = ["/usr/include/xpc/xpc.h",
"/usr/include/xpc/activity.h",
@knightsc
knightsc / hijack.c
Created February 26, 2019 21:20
Example of how to hijack a thread on macOS to run code in a remote process
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include <mach/mach.h>
#include <mach/mach_vm.h>
#include <dlfcn.h>
#include <objc/runtime.h>
@moyix
moyix / README.txt
Created October 26, 2020 01:14
Recover edge information from afl-showmap
If you have a list of edge hashes produced by AFL (e.g. from something like this):
./afl-showmap -o foo.edges -t 500 -q -e -- ./program arg1
Re-run the program using gdb to trace the sequence of block IDs:
./collect_coverage.sh trace.txt ./program arg1
Print edges in the trace: