Skip to content

Instantly share code, notes, and snippets.

View pwnee's full-sized avatar

pwnee

View GitHub Profile
@opa334
opa334 / pplrw.m
Last active July 11, 2024 11:03
PPLRW on iOS < 16.6 (Needs mapping primitive) (Credits: Operation Triangulation by @oct0xor, @bzvr_, @kucher1n)
//
// pplrw.m
// kfd
//
// Created by Lars Fröder on 29.12.23.
//
#import <Foundation/Foundation.h>
#import <dlfcn.h>
#import <mach-o/dyld.h>
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13) and macOS Sonoma (14)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@steven-michaud
steven-michaud / ThirdPartyKexts.md
Last active July 17, 2024 21:06
Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

As of macOS 12 (Monterey), Apple's Virtualization framework has nice support for macOS guest virtual machines, but with severe limitations: For example you can't install a macOS guest on Intel Macs, install guests with newer versions of macOS than the host, copy and paste between the host and the guest, or install third party kernel extensions in the guest. As usual for Apple, the functionality they do support is nicely implemented, but they've left out so much that the result is only marginally useful -- at least compared to

@akemin-dayo
akemin-dayo / virtualapple-utm-link
Last active April 24, 2024 18:34
A cleaned up version of an internal script that I've been using while working on TotalFinder to create VirtualApple virtual machine instances that are hardlinked to a UTM virtual machine instance. It's particularly useful for entering One True recoveryOS (1TR) as well as using the other features found only in VirtualApple.
@b0gdanw
b0gdanw / Disable-Ventura-Bloatware.sh
Last active July 9, 2024 06:01
Disable Ventura Bloatware
#!/bin/zsh
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12) and macOS Ventura (13)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@tihmstar
tihmstar / iPhone_8_15.1_19B74_kernelpatches.txt
Last active April 18, 2024 23:16
iPhone 8 15.1 19B74 checkm8 jb patches
iPhone8 15.1 19B74
iBoot: 0x1800309c0 : 000080d2
iBoot: 0x180038744 : af070094
iBoot: 0x18003a844 : 9386ff17
iBoot: 0x18001c290 : a1000058df0301eb40000054202080d2c0035fd6
iBoot: 0x18001c2a4 : 4887038001000000
iBoot: 0x1800325dc : 200080d2
iBoot: 0x18009127f : 7261316e736e3077206d6f6465
iBoot: 0x180038f04 : 1f2003d5
@Proteas
Proteas / diff-xnu-8020.140.20.0.4.md
Created May 20, 2022 04:29
diff xnu-8020.140.20.0.4~14

kernel

  • xnu-8020.140.20.0.4~14

My Conclusion

  1. kernel heap hardening: tag, type hash
    • kmem_alloc_guard
    • kmem_apply_security_policy
  2. codesign, protecting the members with DA Key
    • csfg_get_*
@jakeajames
jakeajames / poc.c
Last active May 1, 2023 19:58
CVE-2021-30955 PoC
#include <stdlib.h>
#include <stdio.h>
#include <pthread/pthread.h>
#include <mach/mach.h>
struct ool_msg {
mach_msg_header_t hdr;
mach_msg_body_t body;
mach_msg_ool_ports_descriptor_t ool_ports[];
};

禁用Lid-Sleep的命令(保持系统唤醒):

sudo pmset -b sleep 0; sudo pmset -b disablesleep 1

激活Lid-Sleep的命令(让系统再次正常休眠):

sudo pmset -b sleep 5; sudo pmset -b disablesleep 0
@alyssarosenzweig
alyssarosenzweig / demo.m
Created September 25, 2021 02:09
AppleJPEGDriver decode routine for the Apple M1
/*
* Copyright (C) 2021 Alyssa Rosenzweig <alyssa@rosenzweig.io>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*