package binsec_codex

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Hooks.MakeSource

Parameters

Signature

Sourcetype skip_type =
  1. | NotWhenInterpreting
  2. | Always
Sourcetype hook =
  1. | SkipTo of skip_type * Binsec.Virtual_address.t
    (*

    skip to address

    *)
  2. | Hook of Record_cfg.t -> State.t -> Record_cfg.t * (Binsec.Virtual_address.t * State.t) list
    (*

    Manually change the transfer function of an instruction.

    *)
  3. | ChangeState of State.t -> State.t
    (*

    Modifies the state before executing the corresponding instruction.

    *)
  4. | Unroll of int
    (*

    Unroll every loop having this address as its head. Argument: number of iterations.

    *)
  5. | EndPath
    (*

    End this trace

    *)
  6. | Return of Types.TypedC.typ option
    (*

    End this trace and check the return type if given

    *)
  7. | EntryCall of string * Types.TypedC.typ
    (*

    Used during interprocedural analysis to enter the entry function, but should be replaced the first time it is encountered

    *)
Sourceval find_hook : Binsec.Virtual_address.t -> hook * string

Finds a hook, or raise Not_found.

Sourceval exploration_only : bool ref

Says whether the analysis should be "merge over all paths" only. Initially false.

Sourceval kernel_exit_point : Binsec.Virtual_address.t
Sourceval add_stop : Binsec.Virtual_address.t -> unit

Add a hook to say that we should stop at this address.

Sourceval add_return_unknown : Binsec.Virtual_address.t -> Types.TypedC.typ -> unit

Add a hook to a function address to say that the function should return and just return a value of some type.

Add a hook to a function address to say that the address does nothing, instead it directly jumps to dest.

Sourceval add_entrycall : name:string -> Binsec.Virtual_address.t -> Types.TypedC.typ -> unit
Sourceval add_function_hook : name:string -> Binsec.Virtual_address.t -> Types.TypedC.typ -> unit
Sourceval add_return : Binsec.Virtual_address.t -> Types.TypedC.typ option -> unit