Skip to content

Instantly share code, notes, and snippets.

View wh1te4ever's full-sized avatar

Seo Hyun-gyu wh1te4ever

  • South Korea
  • 20:36 (UTC +09:00)
View GitHub Profile
@wh1te4ever
wh1te4ever / mmap_bypass.c
Last active April 21, 2024 00:30
Bypass sandbox restriction 'mpo_file_check_mmap' via kernel patch (file system sandbox blocked mmap)
#include <stdio.h>
#include <dlfcn.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#define T1SZ_BOOT 17
#define off_p_pfd 0xf8
#define off_fp_glob 0x10
@wh1te4ever
wh1te4ever / dynamic_info.h
Last active December 13, 2023 16:26
KFD offsets for tvOS 16.5 - AppleTV6,2
#ifndef dynamic_info_h
#define dynamic_info_h
struct dynamic_info {
const char* kern_version;
const char* build_version;
const char* device_id;
// struct fileglob
u64 fileglob__fg_ops;
u64 fileglob__fg_data;
@wh1te4ever
wh1te4ever / find_unexported_symbols.c
Last active December 13, 2023 12:39
find_unexported_symbols.c
// seohyun-gyu@MacBook-Pro-2 find_xpc_rich_error_create % gcc -o find_xpc_rich_error_create find_xpc_rich_error_create.c
// seohyun-gyu@MacBook-Pro-2 find_xpc_rich_error_create % ./find_xpc_rich_error_create
// Found image_name: /usr/lib/system/libxpc.dylib, libxpc_hdr: 0x7ff80647a000
// _xpc_rich_error_create address: 0x7ff80649362c
#include <stdio.h>
#include <dlfcn.h>
#include <pthread.h>
#include <mach-o/dyld_images.h>
@wh1te4ever
wh1te4ever / docker_tip.txt
Last active September 21, 2023 13:44
Docker tips
도커 우분투에 있는 설치된 프로그램, 데이터 저장하기 위해 새 이미지 저장
1. docker ps -a로 CONTAINER ID 가져오기
2. docker commit [CONTAINER ID] [지정할 이미지 이름]
새로 생성된 이미지로부터 컨테이너 새로 실행
docker run -it --name --cap-add=SYS_PTRACE --security-opt seccomp=unconfined ubuntu --hostname docker -v /Users/(사용자 이름)/Desktop/ubuntu:/home/ubuntu [1에서 지정했던 지정했던 이미지 이름] /bin/bash
/usr/local/bin/ubuntu
#!/bin/zsh
/usr/local/bin/docker start ubuntu;
@wh1te4ever
wh1te4ever / dumptest.c
Created June 24, 2023 08:41
Dump memory of __DATA, __LINKEDIT segments from running process
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <mach/mach.h>
#include <mach/vm_map.h>
#include <mach-o/loader.h>
#include <mach-o/dyld_images.h>
#include <fcntl.h>
#define PATH_MAX 1024
@wh1te4ever
wh1te4ever / patch_iphoneos.mm
Created June 12, 2023 17:50
Patch platform of build_version_command to iPhoneOS!
#import <Foundation/Foundation.h>
#include <stdio.h>
#include <string>
#include <mach-o/loader.h>
#include <mach-o/fat.h>
#include <mach/machine.h>
#include <iostream>
#include <cstdlib>
#include <new>
#include <spawn.h>
//
// MultiKaTalkFix.m
// MultiKaTalkFix
//
// Created by Akhil on 12/13/22.
//
#import <Foundation/Foundation.h>
#import "MultiKaTalkFix.h"
#import "MethodSwizzling.h"
@wh1te4ever
wh1te4ever / MultiLineFix.m
Last active July 23, 2023 04:48
Fix sideload for LINE
//
// MutliLineFix.m
// MultiLineFix
//
// Created by Seo Hyun-gyu on 2023/03/04.
//
#import <Foundation/Foundation.h>
#import "MultiLineFix.h"
#import "fishhook.h"