miasm
Reverse engineering framework
|
Classes | |
class | FinishOn |
class | SymbolicFile |
Functions | |
def | xxx_fopen (jitter) |
def | xxx_fread (jitter) |
def | xxx_fclose (jitter) |
def | xxx_fopen_symb (dse) |
def | xxx_fread_symb (dse) |
def | xxx_fclose_symb (dse) |
def | xxx___libc_start_main_symb (dse) |
def | xxx_puts_symb (dse) |
Variables | |
string | is_win = "Windows" |
int | my_FILE_ptr = 0x11223344 |
FInfo = namedtuple("FInfo", ["path", "fdesc"]) | |
dictionary | FILE_to_info = {} |
TEMP_FILE = NamedTemporaryFile(delete = False) | |
parser = Sandbox_Linux_x86_64.parser(description="ELF sandboxer") | |
help | |
choices | |
default | |
options = parser.parse_args() | |
mimic_env | |
command_line | |
loc_db = LocationDB() | |
sb = Sandbox_Linux_x86_64(loc_db, options.filename, options, globals()) | |
do_stk_segm | |
do_ds_segm | |
do_str_segm | |
do_all_segm | |
int | FS_0_ADDR = 0x7ff70000 |
FS | |
dictionary | FILE_to_info_symb = {} |
FILE_stream = ExprId("FILE_0", 64) | |
FILE_size = ExprId("FILE_0_size", 64) | |
todo = set([b""]) | |
machine = Machine("x86_64") | |
dictionary | strategy |
dse = DSEPathConstraint(machine, loc_db, produce_solution=strategy) | |
z3_file_size = dse.z3_trans.from_expr(FILE_size) | |
snapshot = dse.take_snapshot() | |
Save the current clean state, before any computation of the FILE content. More... | |
bool | found = False |
file_content = todo.pop() | |
keep_known_solutions | |
dictionary | finfo = FILE_to_info_symb[FILE_stream] |
list | out = [] |
fsize | |
dictionary | byteid = finfo.gen_bytes[index] |
crackme | |
stdout = stdout.strip() | |
stderr | |
Example of DynamicSymbolicExecution engine use This example should run on the compiled ELF x86 64bits version of "dse_crackme.c"
def dse_crackme.xxx___libc_start_main_symb | ( | dse | ) |
def dse_crackme.xxx_fclose | ( | jitter | ) |
#include <stdio.h> int fclose(FILE *stream);
def dse_crackme.xxx_fclose_symb | ( | dse | ) |
def dse_crackme.xxx_fopen | ( | jitter | ) |
#include <stdio.h> FILE *fopen(const char *path, const char *mode);
def dse_crackme.xxx_fopen_symb | ( | dse | ) |
def dse_crackme.xxx_fread | ( | jitter | ) |
#include <stdio.h> size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
def dse_crackme.xxx_fread_symb | ( | dse | ) |
def dse_crackme.xxx_puts_symb | ( | dse | ) |
dictionary dse_crackme.byteid = finfo.gen_bytes[index] |
dse_crackme.choices |
dse_crackme.command_line |
dse_crackme.crackme |
dse_crackme.default |
dse_crackme.do_all_segm |
dse_crackme.do_ds_segm |
dse_crackme.do_stk_segm |
dse_crackme.do_str_segm |
dse_crackme.dse = DSEPathConstraint(machine, loc_db, produce_solution=strategy) |
dse_crackme.file_content = todo.pop() |
dse_crackme.FILE_size = ExprId("FILE_0_size", 64) |
dse_crackme.FILE_stream = ExprId("FILE_0", 64) |
dictionary dse_crackme.FILE_to_info = {} |
dictionary dse_crackme.FILE_to_info_symb = {} |
dse_crackme.FInfo = namedtuple("FInfo", ["path", "fdesc"]) |
dictionary dse_crackme.finfo = FILE_to_info_symb[FILE_stream] |
bool dse_crackme.found = False |
dse_crackme.FS |
int dse_crackme.FS_0_ADDR = 0x7ff70000 |
dse_crackme.fsize |
dse_crackme.help |
string dse_crackme.is_win = "Windows" |
dse_crackme.keep_known_solutions |
dse_crackme.loc_db = LocationDB() |
dse_crackme.machine = Machine("x86_64") |
dse_crackme.mimic_env |
int dse_crackme.my_FILE_ptr = 0x11223344 |
dse_crackme.options = parser.parse_args() |
list dse_crackme.out = [] |
dse_crackme.parser = Sandbox_Linux_x86_64.parser(description="ELF sandboxer") |
dse_crackme.sb = Sandbox_Linux_x86_64(loc_db, options.filename, options, globals()) |
dse_crackme.snapshot = dse.take_snapshot() |
Save the current clean state, before any computation of the FILE content.
dse_crackme.stderr |
dse_crackme.stdout = stdout.strip() |
dictionary dse_crackme.strategy |
dse_crackme.TEMP_FILE = NamedTemporaryFile(delete = False) |
dse_crackme.todo = set([b""]) |
dse_crackme.z3_file_size = dse.z3_trans.from_expr(FILE_size) |