def main(argv=None): logging.basicConfig(level=logging.INFO) logging.getLogger().setLevel(logging.INFO) ignore_floss_logs() logger.info("loading vivisect workspace...") vw = viv_utils.loadWorkspaceFromIdb() logger.info("loaded vivisect workspace") selected_functions = vw.getFunctions() time0 = time.time() logger.info("identifying decoding functions...") decoding_functions_candidates = floss.identification_manager.identify_decoding_functions(vw, selected_functions) for fva, score in decoding_functions_candidates.get_top_candidate_functions(): logger.info("possible decoding function: 0x%x score: %.02f", fva, score) logger.info("decoding strings...") decoded_strings = floss.main.decode_strings(vw, decoding_functions_candidates, MIN_LENGTH, no_filter=True) logger.info("decoded %d strings", len(decoded_strings)) logger.info("extracting stackstrings...") stack_strings = floss.stackstrings.extract_stackstrings(vw, selected_functions, MIN_LENGTH, no_filter=True) stack_strings = set(stack_strings) logger.info("decoded %d stack strings", len(stack_strings)) apply_decoded_strings(decoded_strings) apply_stack_strings(stack_strings) time1 = time.time() logger.debug("finished execution after %f seconds", (time1 - time0)) return 0
def main(argv=None): logging.basicConfig(level=logging.INFO) logging.getLogger().setLevel(logging.INFO) ignore_floss_logs() logger.info("loading vivisect workspace...") vw = viv_utils.loadWorkspaceFromIdb() logger.info("loaded vivisect workspace") selected_functions = vw.getFunctions() time0 = time.time() logger.info("identifying decoding functions...") decoding_functions_candidates, meta = floss.identify.find_decoding_function_features( vw, selected_functions, disable_progress=True ) logger.info("decoding strings...") decoded_strings = floss.string_decoder.decode_strings( vw, floss.identify.get_function_fvas(decoding_functions_candidates), MIN_LENGTH, disable_progress=True ) logger.info("decoded %d strings", len(decoded_strings)) logger.info("extracting stackstrings...") stack_strings = floss.stackstrings.extract_stackstrings(vw, selected_functions, MIN_LENGTH, no_filter=True) stack_strings = set(stack_strings) logger.info("decoded %d stack strings", len(stack_strings)) # TODO tight strings apply_decoded_strings(decoded_strings) apply_stack_strings(stack_strings) time1 = time.time() logger.debug("finished execution after %f seconds", (time1 - time0)) return 0
def main(argv=None): logging.basicConfig(level=logging.INFO) logging.getLogger().setLevel(logging.INFO) ignore_floss_logs() logger.info('loading vivisect workspace...') vw = viv_utils.loadWorkspaceFromIdb() logger.info('loaded vivisect workspace') selected_functions = vw.getFunctions() selected_plugins = floss.main.get_all_plugins() time0 = time.time() logger.info("identifying decoding functions...") decoding_functions_candidates = floss.identification_manager.identify_decoding_functions(vw, selected_plugins, selected_functions) for fva, score in decoding_functions_candidates.get_top_candidate_functions(): logger.info('possible decoding function: 0x%x score: %.02f', fva, score) logger.info("decoding strings...") decoded_strings = floss.main.decode_strings(vw, decoding_functions_candidates, MIN_LENGTH, no_filter=True) logger.info('decoded %d strings', len(decoded_strings)) logger.info("extracting stackstrings...") stack_strings = floss.stackstrings.extract_stackstrings(vw, selected_functions, MIN_LENGTH, no_filter=True) stack_strings = set(stack_strings) logger.info('decoded %d stack strings', len(stack_strings)) apply_decoded_strings(decoded_strings) apply_stack_strings(stack_strings) time1 = time.time() logger.debug("finished execution after %f seconds", (time1 - time0)) return 0
def floss_load_workspace(self): return viv_utils.loadWorkspaceFromIdb()