Skip to content

Instantly share code, notes, and snippets.

View withzombies's full-sized avatar

Ryan Stortz withzombies

View GitHub Profile
@withzombies
withzombies / crackaddr_vuln.c
Last active January 23, 2024 09:51
halvar's reimplementation of mark dowd's crackaddr vulnerability
/*
Copyright (c) 2011, Thomas Dullien
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. Redistributions
CREATE TABLE _SqliteDatabaseProperties (key TEXT, value TEXT, UNIQUE(key));
CREATE TABLE deleted_messages (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL);
CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE chat_handle_join (chat_id INTEGER REFERENCES chat (ROWID) ON DELETE CASCADE, handle_id INTEGER REFERENCES handle (ROWID) ON DELETE CASCADE, UNIQUE(chat_id, handle_id));
CREATE TABLE sync_deleted_messages (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL, recordID TEXT );
CREATE TABLE message_processing_task (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL, task_flags INTEGER NOT NULL );
CREATE TABLE handle (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, id TEXT NOT NULL, country TEXT, service TEXT NOT NULL, uncanonicalized_id TEXT, person_centric_id TEXT, UNIQUE (id, service) );
CREATE TABLE sync_deleted_chats (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL, recordID TEXT,timestamp INTEGER);
CREATE TABLE message_attachment_join
@withzombies
withzombies / changed-crypt.txt
Last active May 3, 2023 19:51
Apple RSR changes 16.4.1 (a)
./.fseventsd/fseventsd-uuid
./System/Library/Accounts/DataclassOwners/Bookmarks.bundle/Bookmarks
./System/Library/Accounts/DataclassOwners/Bookmarks.bundle/Info.plist
./System/Library/Accounts/Notification/WebBookmarksNotificationPlugin.bundle/Info.plist
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.01
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.02
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.03
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.04
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.05
@withzombies
withzombies / 334x.py
Last active March 26, 2023 16:22
Script to solve the 334 cuts challenge from DEFCON 2016 quals using Binary Ninja
#!/usr/bin/env python
import sys
try:
import binaryninja
except ImportError:
sys.path.append("/Applications/Binary Ninja.app/Contents/Resources/python/")
import binaryninja
import time
import socket
@withzombies
withzombies / recaptcha.py
Created February 28, 2023 13:36
A Zapier step to validate a reCaptcha.
import requests
input_data['success'] = 'false'
captcha = input_data.get('captcha')
if captcha is None:
return input_data
body = {
'secret': 'SECRET',
@withzombies
withzombies / install-api.py
Created September 21, 2016 04:21
Install the Binary Ninja Python API
#!/usr/bin/env python
import os
import sys
import os.path
import site
try:
import binaryninja
print "Binary Ninja API Installed"
@withzombies
withzombies / fly.toml
Created November 6, 2022 23:22
Ghost 5 with sqlite3
# fly.toml file generated for notcheckmark on 2022-05-20T23:24:53-04:00
app = "notcheckmark"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[build]
image = "ghost:alpine"
@withzombies
withzombies / locale_number_parsing.swift
Last active September 28, 2022 17:40
Parsing a locale decimal number
func testFoundationDouble() {
let locales: [Locale] = [Locale(identifier: "en_US"), Locale(identifier: "de_DE"), Locale(identifier: "es_AR"), Locale(identifier: "es_ES"), Locale(identifier: "es_MX"), Locale(identifier: "fr_FR")]
let numbers: [Double] = [0.01, 0.1, 1, 1_100.10, 100_000_000]
for locale in locales {
let nf = NumberFormatter()
nf.locale = locale
nf.groupingSize = 3
nf.usesGroupingSeparator = true
nf.minimumSignificantDigits = 2
@withzombies
withzombies / README.md
Created February 1, 2022 18:33
Binary Ninja 3.0 Psuedo C vs Ghidra

For the test case I'm using one from Ghidra's test suite, which is available here

It was compiled on my macOS machine with the following command:

$ clang -o decomp -O1 -g decomp.c -Wall -Wshadow -Wextra -std=c17 -arch arm64e

Some metadata:

@withzombies
withzombies / update-heroku-certs.py
Created June 10, 2021 00:28
Script to download the latest lets encrypt certificate and key from DNSimple and apply them to your heroku endpoints
#!/usr/bin/env python3
"""
Copyright 2021 Trail of Bits
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0