Skip to content

Instantly share code, notes, and snippets.

View cetfor's full-sized avatar

John Toterhi cetfor

  • Columbus, OH
View GitHub Profile
@cetfor
cetfor / test.py
Last active October 29, 2020 14:18
Binary Ninja Update Analysis Test
import argparse
import binaryninja
import sys
import tempfile
import time
import math
import os
from multiprocessing import Pool, TimeoutError, cpu_count
#Checks system calls for command injection patterns
#@author
#@category HackOvert
#@keybinding
#@menupath
#@toolbar
from ghidra.app.decompiler import DecompileOptions
from ghidra.app.decompiler import DecompInterface
from ghidra.program.model.pcode import Varnode
import binaryninja
sources = [
'snprintf', # int snprintf ( char * s, size_t n, const char * format, ... );
'sprintf', # int sprintf ( char * s, const char * format, ... );
]
sinks = [
'system', # int system(const char *command);
]
@cetfor
cetfor / challenge.c
Created January 22, 2021 21:44
Scripts and code for HackOvert Z3 function modeling
// Challenge from:
// https://www.reddit.com/r/ExploitDev/comments/gv72xr/reverse_engineer_passphrase_check/
#include <stdio.h>
#include <string.h>
int check(char* input) {
if (strlen(input) != 15) {
return 0;
} else {