This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Draw a binary as a circle-packed diagram. | |
# | |
# Usage: | |
# $ ./thisfile.py /path/to/binary.bndb | |
# writes /tmp/tmp.png | |
import os, sys | |
import binaryninja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# draw binary (as decomposed with Binary Ninja) in a treemap | |
# | |
# $ ./thisfile.py /path/to/mybinary.exe | |
# | |
# then check /tmp/tmp.png | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# invoke with path to the binary to be analyzed | |
# use 'a' and 'q' to change palette | |
# binja needs to be running udp_nav plugin to have clicks here move binja around https://gist.github.com/lwerdna/360446a59dedeb1defa2f86128e591bf | |
import os | |
import sys | |
import random | |
import socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import time | |
bv = None | |
lookup = {} | |
table_data = [] | |
def gui_thread(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* count valid disassemblies | |
compile: | |
g++ -std=c++11 coverage.cpp -pthread -lcapstone -o coverage | |
*/ | |
#include <stdio.h> | |
#include <inttypes.h> | |
#include <pthread.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# draw functions (identified with Binary Ninja) as Hilbert curve regions | |
# usage: | |
# ./bin2hilbert.py /path/to/mybinary.exe | |
# | |
# then check /tmp/tmp.png | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# BinaryNinja plugin | |
# adds tools menu item to rename all sub_XXX to "AdjectiveAnimal" | |
import re | |
import random | |
from binaryninja.plugin import PluginCommand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# convert SDCC .rel files to 32-bit ELF relocatable | |
# | |
# resulting file structure: | |
# | |
# ------------------------ | |
# ELF header | |
# ------------------------ | |
# .text section |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# quick start: ./binimplant_elf64.py linux implant.bin ./target.elf | |
import re | |
import sys | |
import struct | |
import random | |
import binascii |
NewerOlder