Skip to content

Instantly share code, notes, and snippets.

View Peterpan0927's full-sized avatar
💩
Digging Shit

Peterpan0927 Peterpan0927

💩
Digging Shit
View GitHub Profile
@Peterpan0927
Peterpan0927 / dbgspawn.c
Created October 4, 2023 03:01 — forked from DerekSelander/dbgspawn.c
A quick Darwin helper tool to diagnose why your program keeps crashing
//
// A simple arm64[e] launcher program that catches program crashes and spits out every thread's state and backtrace
//
// dbgspawn.c
// Created by Derek Selander on 9/27/23.
// Permissive License: do whatever, so long as you keep this header & note that I am not responsible for any damages
//
/* To build for iOS on macOS
@Peterpan0927
Peterpan0927 / cheatsheet.md
Created August 10, 2022 09:54 — forked from masklinn/cheatsheet.md
launchctl/launchd cheat sheet

I've never had great understanding of launchctl but the deprecation of the old commands with launchctl 2 (10.10) has been terrible as all resources only cover the old commands, and documentation for Apple utilities is generally disgracefully bad, with launchctl not dissembling.

Mad props to https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ which contains most details

domains

Internally, launchd has several domains, but launchctl 1 would only ask for service names,

@Peterpan0927
Peterpan0927 / IOSurface_stuff.c
Created March 9, 2022 02:55 — forked from jakeajames/IOSurface_stuff.c
WIP CVE-2021-30955 exploit
//
// IOSurface_stuff.c
// time_waste
//
// Created by Jake James on 2/22/20.
// Copyright © 2020 Jake James. All rights reserved.
//
#import "IOSurface_stuff.h"
@Peterpan0927
Peterpan0927 / phoenix.c
Created April 23, 2021 02:27 — forked from Siguza/phoenix.c
Phœnix exploit / iOS 9.3.5
// Bugs by NSO Group / Ian Beer.
// Exploit by Siguza & tihmstar.
// Thanks also to Max Bazaliy.
#include <stdint.h> // uint32_t, uint64_t
#include <stdio.h> // fprintf, stderr
#include <string.h> // memcpy, memset, strncmp
#include <unistd.h> // getpid
#include <mach/mach.h>
#include <stdlib.h>