Skip to content

Instantly share code, notes, and snippets.

@joshwatson
joshwatson / callgraph.py
Last active July 10, 2020 02:08
Callgraph Generating Binary Ninja Plugin
import struct
import threading
import binaryninja as bn
class Graph(object):
def __init__(self, view):
# type: (Graph, bn.BinaryView) -> None
self.view = view
@joshwatson
joshwatson / bookmarks.py
Last active October 12, 2016 10:58
Create/List bookmarks in Binary Ninja
'''
bookmarks.py - Create/List bookmarks in Binary Ninja
Copyright (c) 2016 Josh Watson
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active March 19, 2024 17:24 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

#!/usr/bin/python
"""
Stagefright PoC for https://android.googlesource.com/platform/frameworks/av/+/2b50b7aa7d16014ccf35db7a7b4b5e84f7b4027c
"""
from struct import pack
def create_box(atom_type, data):
return pack("!I", len(data)+4+4) + atom_type + data
@fi01
fi01 / How to use msm_acdb explot
Created July 28, 2013 04:42
Stack-based buffer overflow in acdb audio driver (CVE-2013-2597)
To use msm_acdb explot we need to work 4 steps.
1. Find how to run command with root or system previlege
2. Get offset for registers to setup
3. Choose proper code in kernel image
4. Setup parameters in acdb.c
1. Find how to run command with root or system previlege
Do it your self. :-P
@mrenouf
mrenouf / reverse-tether.sh
Created August 11, 2012 23:01
USB reverse tethering script (only tested on Ubuntu 12.04 with Galaxy Nexus)
#!/bin/bash
ADB="/home/mrenouf/bin/adb"
# We need root on the host to mess with networking
if [[ $(whoami) != "root" ]]; then
echo "You must be root to run this script!"
exit 1
fi;