Skip to content

Instantly share code, notes, and snippets.

@matteyeux
matteyeux / .env
Last active April 24, 2024 09:46
docker-compose version 3.8 for Elasticsearch and Kibana
# Password for the 'elastic' user (at least 6 characters)
ELASTIC_PASSWORD=pouet
# Password for the 'kibana_system' user (at least 6 characters)
KIBANA_PASSWORD=pouetpouet
# Version of Elastic products
STACK_VERSION=8.3.2
# Set the cluster name
#!/usr/bin/env python3
# initial script by b1n4r1b01 but he deleted his repo
# https://gist.github.com/woachk/6092f9ae950455dcdf8428c3ce2d639e
# added python3 support
import sys
import struct
import os
@matteyeux
matteyeux / build-xnu-4903.221.2.sh
Created December 11, 2018 08:04
A script to build XNU version 4903.221.2 (macOS High Sierra 10.13). Initial script by Brandon Azad.
#! /bin/bash
#
# build-xnu-4903.221.2.sh
# Initial script by Brandon Azad (https://gist.github.com/bazad/654959120a423b226dc564073b435453)
# Updated on 12/11/18 by matteyeux
#
# A script showing how to build XNU version 4570.1.46 on MacOS High Sierra
# 10.13 with Xcode 9.
#
# Note: This process will OVERWRITE files in Xcode's MacOSX10.13.sdk. Make a
@matteyeux
matteyeux / decrypted.json
Created November 20, 2023 13:15
Apple Vision Pro firmware keys for VisionOS 1.0 beta 1-5
[
{
"url": "https://updates.cdn-apple.com/2023SummerSeed/patches/042-21091/60572AF0-9BC3-465F-89ED-77117194CB26/com_apple_MobileAsset_SoftwareUpdate/3df121022bd578846478faa25a4dcf3055396954.zip",
"build": "21N5207g",
"filename": "iBEC.n301.RELEASE.im4p",
"kbag": "AB7893B981E44BFF298328C89C826F8BA6EF1A7ADC80DB156C9D55D9F4E27E8AD2CC21AFA42A41E1392B57E9FE90D992",
"key": "34b218667cd03eb93e073b9b3bca4a865b20f130550a800b2aa2c1c2348041865cee47db7e3bcda739d05adde9f9f716"
},
{
"url": "https://updates.cdn-apple.com/2023SummerSeed/patches/042-21091/60572AF0-9BC3-465F-89ED-77117194CB26/com_apple_MobileAsset_SoftwareUpdate/3df121022bd578846478faa25a4dcf3055396954.zip",
@matteyeux
matteyeux / build_pongo.sh
Last active February 13, 2024 00:21
Bash script to install dependencies needed to build PongoOS on Linux
#!/bin/bash
############################################################
# Script to install everything needed
# to build PongoOS on Linux.
# tested on Debian and Ubuntu
#
# to clean : sudo rm -rf /opt/ios-arm64e-clang-toolchain \
# pongoOS /usr/share/sdks
############################################################
set -e
@matteyeux
matteyeux / sptm.py
Last active February 9, 2024 18:30
Binary Ninja snippet to symbolize sptm
# void _panic(char const* func, char const* str, ...)
def get_panic():
for s in bv.strings:
if "somehow a violation was triggered in early boot" in s.value:
break
ref = list(bv.get_code_refs(s.start))[0]
real_panic = bv.get_functions_containing(ref.address)[0]
panic_ref = list(bv.get_code_refs(real_panic.start))[0]
panic_wrapper = bv.get_functions_containing(panic_ref.address)[0]
@matteyeux
matteyeux / f.md
Created September 30, 2023 17:05
macOS and iOS Security Internals Advent Calendar
ROM:00003965 DCB 0, 0x60, 0
ROM:00003968 aArgumentD DCB "argument = %d",0xA,0
ROM:00003977 DCB 0xA,0
ROM:00003979 aPullingTz0Blac DCB "pulling TZ0 blackbird",0xA,0
ROM:00003990 aTz000xX DCB "TZ0[0]: 0x%x",0xA,0
ROM:0000399E aTz010xX DCB "TZ0[1]: 0x%x",0xA,0
ROM:000039AC aTz0RegsModifie DCB "TZ0 regs modified",0xA,0
ROM:000039BF aTz0FailedToLoc DCB "TZ0 failed to lock",0xA,0
ROM:000039D3 aTz1FailedToLoc DCB "TZ1 failed to lock",0xA,0
ROM:000039E7 aTz0Base0xLlx DCB "tz0_base: 0x%llx",0xA,0
fio --filename=/tmp/test --rw=randread --size=2Go --direct=1 --bs=1M --ioengine=libaio --runtime=60 --numjobs=1 --time_based --group_reporting --name=seq_read --iodepth=16
fio --filename=/tmp/test --rw=read --size=5Go --direct=1 --bs=1M --ioengine=libaio --runtime=60 --numjobs=1 --time_based --group_reporting --name=seq_read --iodepth=16
@matteyeux
matteyeux / avp.md
Last active November 14, 2023 13:01