Skip to content

Instantly share code, notes, and snippets.

View bash-c's full-sized avatar
🦕
learning

Aobo Wang bash-c

🦕
learning
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active May 10, 2024 17:04
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@jessica0f0116
jessica0f0116 / apisetschema.json
Created April 13, 2021 16:01
apisetschema mapping windows 20h2
{ "apiset entries": [
{ "apiset name": "api-ms-onecoreuap-print-render-l1-1-0", "hosts": "printrenderapihost.dll" },
{ "apiset name": "api-ms-win-appmodel-identity-l1-2-0", "hosts": "kernel.appcore.dll" },
{ "apiset name": "api-ms-win-appmodel-runtime-internal-l1-1-7", "hosts": "kernel.appcore.dll" },
{ "apiset name": "api-ms-win-appmodel-runtime-l1-1-3", "hosts": "kernel.appcore.dll" },
{ "apiset name": "api-ms-win-appmodel-state-l1-1-2", "hosts": "kernel.appcore.dll" },
{ "apiset name": "api-ms-win-appmodel-state-l1-2-0", "hosts": "kernel.appcore.dll" },
{ "apiset name": "api-ms-win-appmodel-unlock-l1-1-0", "hosts": "kernel.appcore.dll" },
{ "apiset name": "api-ms-win-base-bootconfig-l1-1-0", "hosts": "advapi32.dll" },
{ "apiset name": "api-ms-win-base-util-l1-1-0", "hosts": "advapi32.dll" },
@uf0o
uf0o / crude_ioctl_fuzzer.py
Last active April 11, 2024 06:29
A crude IOCTL fuzzer for windows driver testing
import random
import sys
import io
from ctypes import windll, POINTER, byref
from ctypes.wintypes import LPVOID, DWORD, LPCSTR, LPSTR, BOOL, HANDLE
DeviceIoControl = windll.kernel32.DeviceIoControl
CreateFileA = windll.kernel32.CreateFileA
CloseHandle = windll.kernel32.CloseHandle
@m1ghtym0
m1ghtym0 / x.py
Created February 9, 2020 02:09
winterpreter
#!/usr/bin/env python2
from pwn import *
import sys
import struct
BINARY = './winterpreter.exe'
IS_REMOTE = True
H,P = ('183.107.102.15', 54321)
if not IS_REMOTE:
@saelo
saelo / 3_years_of_attacking_javascript_engines.txt
Created October 27, 2019 16:04
3 Years of Attacking JavaScript Engines
|=-----------------------------------------------------------------------=|
|=-------------=[ 3 Years of Attacking JavaScript Engines ]=-------------=|
|=-----------------------------------------------------------------------=|
|=------------------------------=[ saelo ]=------------------------------=|
|=-----------------------------------------------------------------------=|
The following are some brief notes about the changes that have taken place
since the release of the "Attacking JavaScript Engines" paper [1]. In
general, no big conceptional changes have happened since. Mitigations have
been added to break some of the presented techniques and, as expected, a
@icecr4ck
icecr4ck / idapython_cheatsheet.md
Last active April 23, 2024 18:45
Cheatsheet for IDAPython
@apogiatzis
apogiatzis / checksec.py
Created August 11, 2019 12:17
Windows checksec equivalent
import lief
from sys import argv
import colorama
def _color_print(name):
colorama.init(autoreset=True)
def color_print(func):
def wrapper(*args, **kwargs):
ret = func(*args, **kwargs)
if ret != False:
@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active May 11, 2024 14:01
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@apsun
apsun / hax.c
Last active April 22, 2024 05:49
Hook main() using LD_PRELOAD
/*
* Hook main() using LD_PRELOAD, because why not?
* Obviously, this code is not portable. Use at your own risk.
*
* Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl'
* Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out'
*/
#define _GNU_SOURCE
#include <stdio.h>
@n30m1nd
n30m1nd / apatching_for_AFL_Persistent_fuzzing.diff
Last active October 10, 2021 15:12
Patch for Apache httpd to make it fuzzable through afl-clang-fast
Index: server/main.c
===================================================================
--- server/main.c (revision 1794475)
+++ server/main.c (working copy)
@@ -434,11 +434,157 @@
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
" -X : debug mode (only one worker, do not detach)");
- destroy_and_exit_process(process, 1);
+ destroy_and_exit_process(process, 0);