Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Stortz withzombies

View GitHub Profile
View sms.sql
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 / README.md
Created Feb 1, 2022
Binary Ninja 3.0 Psuedo C vs Ghidra
View README.md

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 Jun 10, 2021
Script to download the latest lets encrypt certificate and key from DNSimple and apply them to your heroku endpoints
View update-heroku-certs.py
#!/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
View gist:8aa2b4ad68bd3b464772bcbdec4a847f
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
addresses:
- 192.168.88.103/24
gateway4: 192.168.88.1
View instruction_state_info.py
#!/usr/bin/env python
# Copyright 2017 Ryan Stortz (@withzombies)
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
@withzombies
withzombies / bnil_graph.py
Last active Jun 3, 2019
BinaryNInja plugin to graph BNIL Instructions (they're tree form)
View bnil_graph.py
#!/usr/bin/env python
# Copyright 2017 Ryan Stortz (@withzombies)
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
@withzombies
withzombies / crackaddr_vuln.c
Created Apr 20, 2017
halvar's crackaddr test case
View crackaddr_vuln.c
/*
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
@withzombies
withzombies / StructuredDataView.py
Last active Oct 3, 2018
Apply a structure to an address and access its members in BinaryNinja
View StructuredDataView.py
#!/usr/bin/env python
# Copyright 2017 Ryan Stortz (@withzombies)
#
# 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
#
View gist:156dda9f12bec78bfa53a5e1fd3ee40d
$ python binja_memcpy.py /bin/bash
Analyzing /bin/bash
100038024 dst:<entry rsi>
src:<entry rdi>
n:<range: -0x80000000 to 0x7fffffff>
1000380c9 dst:<undetermined>
src:<entry rdi>
n:<range: -0x80000000 to 0x7fffffff>
View type.py
def returnTypedString():
# type: () -> str
return "lol"
def returnUntypedString():
return "aww"
a = returnTypedString()
b = returnUntypedString()