Skip to content

Instantly share code, notes, and snippets.

View 0cyn's full-sized avatar
🐉

cynder 0cyn

🐉
View GitHub Profile
{
"name": "gruvbox-material",
"style": "Fusion",
"styleSheet": "QMainWindow {border-image:url(/Users/cynder/Library/Application Support/Binary Ninja/themes/cynder/autumn2.png) 0 0 0 0 stretch stretch;} QMenu { background-color: rgba(0, 0, 0, 90); }",
"colors": {
"transparent": "#00000000",
"black": "#0D0D0D",
"white": "#b5afaa",
"red": "#9fbbbd",
@0cyn
0cyn / overrides.py
Created June 26, 2022 18:36
custom sysregs for aarch64 for binaryninja
apple_arm64 = {
"metadata": {
"description": "Representations of registers and instructions for various CPU elements",
"credits": [
"https://gist.github.com/bazad/42054285391c6e0dcd0ede4b5f969ad2"
]
},
"aarch64": {
"pstate": {
"3": "UAO",
================================== iphone11,2 ===================================================
14.4.1-14.2
key : 5a37b94ad2b79cb789ed930f0dff883ed0487a86151844450e0a197070647369e9691f5091c202ab8699939f31bf6c4a
18B92/14.2
key : aa0684897a2a372e7bcb0f26625a70142bdb671267af4d23a2ec851910c7e8641a738ce63c1fccc558b480baa0b086f2
@0cyn
0cyn / vm.py
Created March 7, 2022 08:42
Quick page table emulation in python
class VM:
def __init__(self, page_size):
self.page_size = page_size - 1
self.page_size_bits = self.page_size.bit_length()
self.page_table = {}
self.tlb = {}
def translate(self, address) -> int:
try:
return self.tlb[address]
---
name: rtdump
icmd: sbreload
package: blog.katwalk.rtdump
version: 1.0.0
description: runtime load and dump raw metadata of classes
author: kritanta
rtdump:
type: cli
@0cyn
0cyn / dec.py
Last active November 20, 2022 02:26
convert ida decompiler output into something a bit closer to proper objc syntax
code = """your IDA decompiler output here"""
lines = code.split('\n')
import re
from enum import Enum
mfp1 = re.compile('(\S*?) \S*? ([-+])\[(\S*) ([^\]]*)]\(([^\)]*)\)')
depth1_objc_call = re.compile('([-+])\[(\S*) ([^\]]*)]\(([^\)]*)\)')
@0cyn
0cyn / remap.py
Last active December 13, 2021 10:10
#!/usr/bin/env python3
import sys, os
from io import BytesIO
from argparse import ArgumentParser
# pip3 install k2l
import ktool
from kmacho import CPUSubTypeARM64
@0cyn
0cyn / HomePlusIsEditing.h
Created November 12, 2021 03:35
Request from a discord user
// kat was also here
static bool isHomePlusEditing = NO;