Skip to content

Instantly share code, notes, and snippets.

@zhuowei
zhuowei / reachable_services.txt
Created February 21, 2023 06:26
Reachable Mach services from the app sandbox on iOS 16.1
PurpleSystemAppPort
PurpleSystemEventPort
UIASTNotificationCenter
com.apple.ABDatabaseDoctor
com.apple.AppSSO.service-xpc
com.apple.AuthenticationServicesCore.AuthenticationServicesAgent
com.apple.CARenderServer
com.apple.ClipServices.clipserviced
com.apple.CoreAuthentication.daemon
com.apple.DeviceAccess.xpc
@Lessica
Lessica / daemon-main.m
Created September 7, 2022 07:54
iOS Daemon without Jetsam
#import <Foundation/Foundation.h>
#import <dlfcn.h>
#import <sys/proc.h>
// these headers can be found at https://github.com/apple/darwin-xnu
#import "libproc.h"
#import "kern_memorystatus.h"
static __attribute__ ((constructor(101), visibility("hidden")))
void BypassJetsam(void) {
@Lessica
Lessica / configure-xcode-for-embedded-development.py
Created March 8, 2022 17:40
iOS Jailbreak Development: Add Command-Line Tool
#!/usr/bin/env python3
#
# Copyright (C) 2014-2020 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@doronz88
doronz88 / flip.py
Last active May 3, 2025 15:25
Convert between ios14 and ios13 arm64e cpu subtypes for all mach-o in a given directory
import sys
from pathlib import Path
MH_MAGIC_64 = b'\xcf\xfa\xed\xfe'
CPU_TYPE_ARM64 = b'\x0c\x00\x00\x01'
CPU_SUBTYPE_IOS13 = b'\x02\x00\x00\x00'
CPU_SUBTYPE_IOS14 = b'\x02\x00\x00\x80'
IOS13_HEADER = MH_MAGIC_64 + CPU_TYPE_ARM64 + CPU_SUBTYPE_IOS13
IOS14_HEADER = MH_MAGIC_64 + CPU_TYPE_ARM64 + CPU_SUBTYPE_IOS14