Skip to content

Instantly share code, notes, and snippets.

{
"plugin": {
"api": "python",
"author": "Vector 35 LLC",
"dependencies": {
"apt": [
"apt",
"packages"
],
"installers": [
@psifertex
psifertex / scc-built-in.h
Last active December 11, 2017 17:54
list of built-in functions available via SCC on windows
CloseHandle(HANDLE handle) __import("kernel32");
CreateDirectoryA(const char* name, void* security) __import("kernel32");
CreateFileA(const char* name, uint32_t access, uint32_t share, void* security, uint32_t disposition,
CreateFileMappingA(HANDLE file, void* security, uint32_t prot,
CreatePipe(HANDLE* read, HANDLE* write, void* security, uint32_t size) __import("kernel32");
CreateProcessA(const char* app, const char* cmdline, void* processAttr, void* threadAttr,
DeleteFileA(const char* name) __import("kernel32");
ExitProcess(uint32_t exitCode) __import("kernel32") __noreturn;
FindClose(HANDLE find) __import("kernel32");
FindFirstFileA(const char* name, WIN32_FIND_DATAA* data) __import("kernel32");
{
"python" :
{
"interpreter" : "/usr/local/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib"
}
}
@psifertex
psifertex / settings.json
Created September 3, 2018 03:37
Example binary ninja settings
{
"python" :
{
"interpreter": "/usr/local/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib"
}
}
@psifertex
psifertex / cla.txt
Last active November 3, 2022 13:29
Binary Ninja API CLA
### Contribution License Agreement
This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”), and conveys certain license rights to Vector 35 Inc and its affiliates (“Vector35”) for Your contributions to Vector35 open source projects. This Agreement is effective as of the latest signature date below.
**Definitions**
“Code” means the computer software code, whether in human-readable or machine-executable form, that is delivered by You to Vector35 under this Agreement.
“Project” means any of the projects owned or managed by Vector35 and offered under a license approved by the Open Source Initiative (www.opensource.org).
@psifertex
psifertex / keybindings.json
Last active October 11, 2022 19:23
simple VIM style motion keys for Binary Ninja
{
"Back" : "Escape; Back; Ctrl+[; Meta+O",
"Forward" : "Forward; Ctrl+[; Meta+I",
"Change Type..." : "Shift+Y; ",
"Close Window" : "Ctrl+W; X",
"Command Palette" : "Ctrl+P; Space",
"Copy" : "Ctrl+C; Y",
"Disassembly Graph" : "G, L",
"Display as\\Binary" : "D",
"Display as\\Default" : "D",
@psifertex
psifertex / string-annotator.py
Created September 4, 2019 21:52
inline string annotator for binary ninja
annotation=""
for instruction in current_basic_block.get_disassembly_text():
if instruction.address >= current_selection[0] and instruction.address < current_selection[1]:
address = instruction.address
value = instruction.tokens[-1].value
operand = instruction.tokens[-1].operand
type = IntegerDisplayType.CharacterConstantDisplayType
current_function.set_int_display_type(address, value, operand, type)
annotation += chr(instruction.tokens[-1].value)
log_info("Adding comment for string: %s" % annotation)
@psifertex
psifertex / export-settings.py
Created September 6, 2019 02:24
Automatic Settings Documentation in Binary Ninja
import json
from PySide2.QtGui import QGuiApplication
settings = json.loads(binaryninja.Settings().serialize_schema())
table = """|Category|Setting|Default|Type|Description|
|---|---|---|---|---|
"""
for category in settings:
for setting in settings[category]['settings']:
title = settings[category]['settings'][setting]['title']
hs.hotkey.bind({"cmd", "alt", "ctrl", "shift"}, "4", function()
local timeStamp = string.gsub(os.date("%Y-%m-%d_%T"), ":", ".")
local fileName = os.getenv("HOME") .. "/Desktop/ss-" .. timeStamp .. ".png"
local windowId = hs.window.frontmostWindow():id()
hs.task.new("/usr/sbin/screencapture", nil, {"-l" .. windowId, fileName }):start()
end)
#############################################################################
##
## Copyright (C) 2017 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the Qt for Python examples of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:BSD$
## You may use this file under the terms of the BSD license as follows: