Skip to content

Instantly share code, notes, and snippets.

@Proteas
Proteas / PoC.m
Last active July 7, 2023 10:22 — forked from LinusHenze/PoC.m
A PoC for CVE-2023-28206
//
// PoC.m
// IOSABugTrigger
//
// Created by Linus Henze on 2023-04-08.
// Copyright © 2023 Pinauten GmbH. Some rights reserved.
//
//
// This is a PoC for CVE-2023-28206, triggering an oob memmove in IosaColorManagerMSR8::getHDRStats_gatedContext
@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_*
@Proteas
Proteas / Quirks of C.md
Created March 17, 2022 23:47 — forked from fay59/Quirks of C.md
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@Proteas
Proteas / com.apple.private.allow-explicit-graphics-priority.txt
Created July 28, 2021 03:01
com.apple.private.allow-explicit-graphics-priority, iOS-v15.0-19A5261w-iPhone13,2
/usr/libexec/backboardd
/usr/sbin/mediaserverd
/System/Library/Frameworks/WebKit.framework/XPCServices/com.apple.WebKit.GPU.xpc/com.apple.WebKit.GPU
/System/Library/Frameworks/WebKit.framework/XPCServices/com.apple.WebKit.WebContent.xpc/com.apple.WebKit.WebContent
/System/Library/Frameworks/AssetsLibrary.framework/Support/assetsd
/System/Library/PrivateFrameworks/NanoTimeKitCompanion.framework/nanotimekitcompaniond
/System/Library/PrivateFrameworks/NanoTimeKitCompanion.framework/XPCServices/NTKFaceSnapshotService.xpc/NTKFaceSnapshotService
/System/Library/PrivateFrameworks/IMTranscoding.framework/XPCServices/IMTranscoderAgent.xpc/IMTranscoderAgent
/System/Library/PrivateFrameworks/CoreSuggestions.framework/suggestd
/private/var/staged_system_apps/Maps.app/Maps
@Proteas
Proteas / blastdoor-ids-mach.txt
Created June 15, 2021 02:50
iOS-v15.0-19A5261w-blastdoor-mig-mach-unix-rules
MSC__kernelrpc_mach_vm_allocate_trap
MSC__kernelrpc_mach_vm_purgable_control_trap
MSC__kernelrpc_mach_vm_deallocate_trap
MSC__kernelrpc_mach_vm_protect_trap
MSC__kernelrpc_mach_vm_map_trap
MSC__kernelrpc_mach_port_allocate_trap
MSC__kernelrpc_mach_port_deallocate_trap
MSC__kernelrpc_mach_port_mod_refs_trap
MSC__kernelrpc_mach_port_insert_right_trap
MSC__kernelrpc_mach_port_insert_member_trap
SYS_exit
SYS_read
SYS_write
SYS_open
SYS_close
SYS_unlink
SYS_chmod
SYS_chown
SYS_getfsstat
SYS_getuid
@Proteas
Proteas / mac_policy_ops-19E287_vs_20A5343i.diff
Last active August 11, 2020 11:08
mac_policy_ops diff: macOS-v10.15.4-19E287 vs. macOS-v11.0-B4-20A5343i
diff --git a/mac_policy_ops.c b/mac_policy_ops.c
index 798bd29..bb3c425 100644
--- a/mac_policy_ops.c
+++ b/mac_policy_ops.c
@@ -2,10 +2,10 @@ struct mac_policy_ops
{
mpo_audit_check_postselect_t *mpo_audit_check_postselect;
mpo_audit_check_preselect_t *mpo_audit_check_preselect;
- mpo_bpfdesc_label_associate_t *mpo_bpfdesc_label_associate;
- mpo_bpfdesc_label_destroy_t *mpo_bpfdesc_label_destroy;
@Proteas
Proteas / iOS-v14.0-18A5301v-WebContent-Unix-Mach-MIG.md
Last active July 8, 2020 04:23
WebContent's sandbox rules of syscall-unix, syscall-mach, mig-kernel in iOS-v14.0-18A5301v

iOS-v14.0-18A5301v-WebContent-Unix-Mach-MIG

Syscall-Unix

SYS_exit
SYS_read
SYS_write
SYS_open
SYS_close
SYS_link
@Proteas
Proteas / ent-diff-iPhone11,2-17E262-vs-17F75.diff
Created May 25, 2020 03:34
ent diff of ios: 17E262-iPhone11,2 vs. 17F75-iPhone11,2
*** ent-list-17E262-iPhone11,2.json 2020-05-25 11:16:14.000000000 +0800
--- ent-list-17F75-iPhone11,2.json 2020-05-25 11:02:29.000000000 +0800
***************
*** 389,394 ****
--- 389,395 ----
"com.apple.developer.default-data-protection",
+ "com.apple.developer.exposure-notification",
"com.apple.developer.extension-host.photo-editing",
***************
*** 820,826 ****