Esempio n. 1
0
def handle_crash_proc( ):
    # 结束Debugger和浏览器进程
    time.sleep(5)  # 给Symbols加载留足够的时间
    config.TerminateProc()
    # 得到当前Crash序号
    crash_num = config.MOR_LAST_COMPLETE_VECOTR + 1
    crash_num_name = "%d%s" % (crash_num, config.MOR_FUZZER_SUFFIX)
    vectorCrashPath = os.path.join(config.MOR_VECTORS_FOLDER, crash_num_name)
    # 读取log信息
    debuggerLogPath = config.MOR_DEBUGGERS[config.MOR_SYSTEM][config.MOR_DEBUGGER_NICK]['log']
    crashHash = GetCrashHash(debuggerLogPath)
    # 保存当前样本和当前log
    dstCrashPath = os.path.join(config.MOR_CRASHES_FOLDER, crashHash + config.MOR_FUZZER_SUFFIX)
    dstLogPath = os.path.join(config.MOR_CRASHES_FOLDER, crashHash + config.MOR_DBGLOG_SUFFIX)
    file.SaveFileFromSrcToDst(vectorCrashPath, dstCrashPath)
    file.SaveFileFromSrcToDst(debuggerLogPath, dstLogPath)
    config.MOR_LAST_COMPLETE_VECOTR += 1
    config.logging_info('M', "Save Crashed Vector %s to %s." % (crash_num_name, crashHash + config.MOR_FUZZER_SUFFIX))
Esempio n. 2
0
def handle_crash_proc():
    # 结束Debugger和浏览器进程
    time.sleep(5)  # 给Symbols加载留足够的时间
    config.TerminateProc()
    # 得到当前Crash序号
    crash_num = config.MOR_LAST_COMPLETE_VECOTR + 1
    crash_num_name = "%d%s" % (crash_num, config.MOR_FUZZER_SUFFIX)
    vectorCrashPath = os.path.join(config.MOR_VECTORS_FOLDER, crash_num_name)
    # 读取log信息
    debuggerLogPath = config.MOR_DEBUGGER[config.MOR_PLATFORM]['log']
    crashHash = GetCrashHash(debuggerLogPath)
    # 保存当前样本和当前log
    dstCrashPath = os.path.join(config.MOR_CRASHES_FOLDER,
                                crashHash + config.MOR_FUZZER_SUFFIX)
    dstLogPath = os.path.join(config.MOR_CRASHES_FOLDER,
                              crashHash + config.MOR_DBGLOG_SUFFIX)
    file.SaveFileFromSrcToDst(vectorCrashPath, dstCrashPath)
    file.SaveFileFromSrcToDst(debuggerLogPath, dstLogPath)
    config.MOR_LAST_COMPLETE_VECOTR += 1
    config.logging_info(
        'M', "Save Crashed Vector %s to %s." %
        (crash_num_name, crashHash + config.MOR_FUZZER_SUFFIX))
Esempio n. 3
0
def morph():
    config.morph_signals()
    config.InitFuzzArgs()
    config.logging_info('S', "Morph fuzzer started at %s..." % time.strftime('%Y-%m-%d %X', time.localtime()))
    # 开启WebSocket服务器
    config.logging_info('S', "WebSocket server running on %s..." % config.MOR_WEBSOCKET_SERVER)
    ws_s = config.MOR_WEBSOCKET_SERVER.split(':')
    t_s = threading.Thread(target=server.Run, args=(ws_s[0], ws_s[1],))
    t_s.setDaemon(True) # 主线程结束时子线程也结束
    t_s.start()
    config.logging_info('L', "Morph Fuzzing loop is running...")
    while 1:
        pre_fuzz()
Esempio n. 4
0
def morph():
    config.morph_signals()
    config.InitFuzzArgs()
    config.logging_info(
        'S', "Morph fuzzer started at %s..." %
        time.strftime('%Y-%m-%d %X', time.localtime()))
    # 开启WebSocket服务器
    config.logging_info(
        'S', "WebSocket server running on %s..." % config.MOR_WEBSOCKET_SERVER)
    ws_s = config.MOR_WEBSOCKET_SERVER.split(':')
    t_s = threading.Thread(target=server.Run, args=(
        ws_s[0],
        ws_s[1],
    ))
    t_s.setDaemon(True)  # 主线程结束时子线程也结束
    t_s.start()
    config.logging_info('L', "Morph Fuzzing loop is running...")
    while 1:
        pre_fuzz()