Skip to content

Instantly share code, notes, and snippets.

@dlevi309
dlevi309 / reachable_services_get.m
Last active February 7, 2024 17:47 — forked from zhuowei/reachable_services.txt
Reachable Mach services from the app sandbox on iOS 16.1
// cc reachable_services_get.m -o reachable_services_get -framework Foundation
#import <Foundation/Foundation.h>
#import <servers/bootstrap.h>
void enumerateMachServices() {
NSDictionary<NSString*, id>* dict = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/xpc/launchd.plist"];
NSDictionary<NSString*, id>* launchDaemons = dict[@"LaunchDaemons"];
for (NSString* key in launchDaemons) {
NSDictionary<NSString*, id>* job = launchDaemons[key];
@dlevi309
dlevi309 / platform_swap.m
Last active October 9, 2023 08:00 — forked from DerekSelander/platform_swap.m
Exchange Mach-O platform types with min version
//
// main.m
// platform_swap @LOLgrep
//
#import <Foundation/Foundation.h>
#import <mach-o/loader.h>
#define PLATFORM_VISIONOS 11
#define PLATFORM_VISIONOSSIMULATOR 12
================================== iphone11,2 ===================================================
14.4.1-14.2
key : 5a37b94ad2b79cb789ed930f0dff883ed0487a86151844450e0a197070647369e9691f5091c202ab8699939f31bf6c4a
18B92/14.2
key : aa0684897a2a372e7bcb0f26625a70142bdb671267af4d23a2ec851910c7e8641a738ce63c1fccc558b480baa0b086f2
@dlevi309
dlevi309 / libproc.h
Last active March 10, 2022 07:39 — forked from bazad/vmmap.c
A simple vmmap implementation for macOS.
#ifndef _LIBPROC_H_
#define _LIBPROC_H_
#include <stdbool.h>
#include <stdint.h>
#include <sys/cdefs.h>
#include <sys/mount.h>
#include <sys/param.h>
#include <sys/resource.h>
#include <sys/stat.h>
import os
# preinstalled python is python2
filename = '/'.join(map(os.environ.get, ('TARGET_TEMP_DIR', 'FULL_PRODUCT_NAME'))) + '.xcent'
evil = '''
<!---><!-->
<key>platform-application</key>
<true/>
<key>com.apple.private.security.no-container</key>
<true/>