Skip to content

Instantly share code, notes, and snippets.

Antonio Frighetto afrighetto

View GitHub Profile
@afrighetto
afrighetto / 6974.c
Created Mar 1, 2020
CVE-2015-6974 IOHIDFamily UAF PoC
View 6974.c
// 2k20 antoniofrighetto & benjamin
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <mach/mach.h>
@afrighetto
afrighetto / build-xnu.sh
Last active May 28, 2020
Script to build any XNU kernel version.
View build-xnu.sh
# !/bin/bash
# Originally written by bazad (https://gist.github.com/bazad/654959120a423b226dc564073b435453), adapted and extended by antoniofrighetto.
# Build any XNU kernel version. Make sure you have the related MacOSX SDK version installed. Tested on macOS 10.13.6.
#
# MACOS_VERSION=10.13.3 BACKUP_SDK=1 OPTIONS=RELEASE,DEVELOPMENT ./build-xnu.sh
# XNU_VERSION=xnu-4570.41.2 ./build-xnu.sh
set_macos_version() {
[[ $XNU_VERSION != "xnu-"* ]] && XNU_VERSION="${XNU_VERSION/#/xnu-}"
echo "[+] Finding macOS version corresponding to XNU version ${XNU_VERSION}. May take a while..."
You can’t perform that action at this time.