In this page, we will show the various classes available through the Python API.
Represents a logical address.
__init__(segment, offset)
Create a logical address from a segment and an offset.
segment | Segment selector of the logical address -> integer |
offset | Virtual offset of the logical address -> integer |
Member | Type | Documentation |
---|---|---|
segment | integer | Segment selector |
offset | integer | Offset |
A range of logical addresses.
__init__(segment=0, offset=0, size=0)
Create a logical address range from a segment, an address, and a size.
segment | Segment selector of the logical address -> integer |
offset | Virtual offset of the logical address -> integer |
size | size of the logical address range -> integer |
__init__(start, end)
Create a logical address range from two logical addresses.
start | Logical address marking the begin of the range. -> logical_address |
end | Logical address marking the end of the range. -> logical_address |
Member | Type | Documentation |
---|---|---|
start | logical_address | Start of the range |
end | logical_address | End of the range |
Represents a physical address.
__init__(offset)
Create a physical address with an offset.
offset | Physical offset of the address in main RAM -> integer |
Member | Type | Documentation |
---|---|---|
paged | boolean | True if the physical address represents a successfully translated address. |
offset | integer | Offset |
Tells the state of the current analysis.
Member | Type | Documentation |
---|---|---|
busy | boolean | Is an analysis in progress ? |
max_tsc | integer | Max TSC |
text | string | Text of the progress |
current_sequence | integer | Current sequence |
max_sequences | integer | Max number of sequences |
current_tsc | integer | Current TSC |
Report of errors.
Member | Type | Documentation |
---|---|---|
binary_name | string | Name of the binary |
bugs | list(bug) | List of bugs in this binary |
A bug or vulnerability found by Reven.
Member | Type | Documentation |
---|---|---|
description | string | Description of the bug |
cwe_description | string | Description of this bug in the CWE database |
cwe_id | integer | Identifier of this bug in the CWE database |
path | list(logical_address) | Complete path to the bug location |
symbol_name | string | Symbol name where the bug occurred |
equations | list(symbolic) | Equations to trigger the bug |
severity | string | Severity of the bug |
Represents a Reven error or limitation.
Member | Type | Documentation |
---|---|---|
line_number | integer | Line number where the error occurred |
message | string | Message |
filename | string | Filename where the error occurred |
Name and date of a saved state.
Member | Type | Documentation |
---|---|---|
timestamp | string | When the state was saved |
name | string | Name of the state |
Represents a binary memory mapping
Member | Type | Documentation |
---|---|---|
start | integer | start address |
end | integer | end address |
Represents a library in a project.
Member | Type | Documentation |
---|---|---|
symbols | list(symbol_information) | Symbols in this binary |
mapping | list(address_space) | Memory mapping of this binary |
name | string | Name of the library |
Represents the project binaries inforations.
Member | Type | Documentation |
---|---|---|
libraries_information | list(library_information) | Symbols in this binary |
Represents a symbol in an analyzed library.
Member | Type | Documentation |
---|---|---|
name | string | Name of the symbol |
Represents a register with a floating point value.
Member | Type | Documentation |
---|---|---|
defined | boolean | True if the register has valid value |
value | string | Value of the register |
Represents a page of memory.
Member | Type | Documentation |
---|---|---|
memories | list(byte) | Memories of the page |
physical_address | physical_address | Physical address of the start of the page |
logical_address | logical_address | Logical address of the start of the page |
Represents a register with a numeric value.
Member | Type | Documentation |
---|---|---|
defined | boolean | True if the register has valid value |
type | symbolic_type | Type of the register |
value | integer | Value of the register |
Represents the context of the machine at a point in time.
read_byte(address)
Read a byte from an address
address | Logical address to read -> logical_address |
physical_address(address)
Returns the physical address of an address
address | Logical address to translate -> logical_address |
Member | Type | Documentation |
---|---|---|
memory_pages | list(memory_page) | Memories |
vector_registers | dict(string -> vector_register) | Registers with a vector value |
float_registers | dict(string -> float_register) | Registers with a float value |
numeric_registers | dict(string -> numeric_register) | Registers with a numeric value |
Represents the context of the machine between two points in time.
Member | Type | Documentation |
---|---|---|
after | running_context | Final state |
before | running_context | Initial state |
Represents a symbolic value.
Member | Type | Documentation |
---|---|---|
content | string | Content |
read_only | boolean | Read only |
physical_address | physical_address | Physical address |
type | symbolic_type | Type |
name | string | Name |
Represents an aggregated delta context of the symbolic memories and registers between two points.
Member | Type | Documentation |
---|---|---|
memories | list(symbolic) | Memories |
registers | list(symbolic) | Registers |
Type of a symbolic variable. For registers, this also specifies the group of register.
Enum | Documentation |
---|---|
register_internal | Internal registers (EIP, CR registers, etc) |
data_named | User-chosen named value |
register_flag | General purpose flags (does not contain FPU flags) |
memory | Memory access |
register_index | Index registers (xSI and xDI) |
unknown | Unknown symbolic type |
register_fpu | Floating point registers (R0-7 ; contains ST0-7 and MM0-7) and FPU flags |
register_segment | Segment registers (CS, DS, ES, FS, GS) |
memory_physical | Direct memory access |
computation | Operation between two symbolics |
register_sse | SSE registers (XMM etc) |
register_stack | Stack registers (xBP and xSP) |
integer | Integer value |
floating | Floating point value |
register_all_purpose | All purpose register (xAX, xBX, xCX, xDX) |
register_debug | Debug registers |
data_vector_part | Vector register |
Represents a register with a floating point value.
Member | Type | Documentation |
---|---|---|
defined | boolean | True if the register has valid value |
value | string | Value of the register |
A hardware device with port and memory ranges.
Member | Type | Documentation |
---|---|---|
port_ranges | list(port_range) | Port ranges of this device |
description | string | Description of device |
name | string | Name of the device |
memory_ranges | list(memory_range) | Memory ranges of this device |
An access to a device.
Member | Type | Documentation |
---|---|---|
subdevice_name | string | Subdevice name |
physical_address | physical_address | If not is_port, contains the physical_address, otherwise 0 |
is_port | boolean | If true, this is a port access |
logical_address | logical_address | If not is_port, contains the logical_address, otherwise 0 |
device_name | string | Device name |
write | boolean | If true, this is a write |
location | execution_point | Location of the access |
port | integer | If is_port, contains the port index, otherwise 0 |
description | string | Textual information of what happened |
Information about the framebuffer.
Member | Type | Documentation |
---|---|---|
width | integer | Width in pixels of the framebuffer |
total_size | integer | Total size of the framebuffer in bytes |
line_size | integer | Bytes per line (may be higher than width*bpp/8) |
height | integer | Height in pixels of the framebuffer |
bpp | integer | Number of bits per pixels |
address | physical_address | Physical address of the framebuffer in memory |
A memory range used by a device.
Member | Type | Documentation |
---|---|---|
physical_address | physical_address | Start address in physical mode |
length | integer | Length of the range, in bytes |
description | string | Description of the memory range |
A port range used by a device.
Member | Type | Documentation |
---|---|---|
length | integer | Length of the range, in ports |
description | string | Description of the port range |
port | integer | Start port |
Base class for inspectors
Various types of arguments available to inspectors
Enum | Documentation |
---|---|
string | A string value |
int_32 | A integer value on 32 bits |
int_16 | A integer value on 16 bits |
exploration_config | Internal, please do not use. |
boolean | A boolean value |
int_64 | A integer value on 64 bits |
Represents an argument of an inspector.
Member | Type | Documentation |
---|---|---|
type | inspector_arg_type | Type of argument |
description | string | Argument description |
name | string | Argument name |
Represents the properties of an inspector.
Member | Type | Documentation |
---|---|---|
to_display | boolean | True if this inspector needs to be displayed in the client |
enabled | boolean | True if this inspector is scheduled for next execution/exploration |
explorator | boolean | True if this inspector can be used for exploration |
executor | boolean | True if this inspector can be used for execution |
debug | boolean | True if this inspector is only useful for debugging |
experimental | boolean | True if this inspector is experimental |
Represents the specifications of an inspector.
Member | Type | Documentation |
---|---|---|
properties | inspector_properties | Inspectorproperties (enabled...) |
arguments | list(inspector_argument) | Arguments for this inspector |
name | string | Name of the inspector |
description | string | Description of the inspector |
Track memory allocations and deallocations to detect memory issues (leaks, invalid heap access...).
__init__(arg2, arg3)
Initializes an allocations.
allocator_name | Customize the name of the allocator -> string |
deallocator_name | Customize the name of the deallocator -> string |
Will alter the program's execution. Is configured through the rerun widget in Axion.
__init__(arg2)
Initializes an alter_execution.
A command example would be #1_1(eax=1)
to force eax
to 1 on the second instruction of sequence #1
commands | Commands (automatically filled by rerun widget) -> string |
Will add some semantique information to the execution.
__init__(arg2)
Initializes an execution_semantic.
kernel_semantic | Will also print the arguments of kernel symbols that have the form xxxxxx@number in their name. -> boolean |
Allows to track a executions after memory write like self modifying code (requires inspector memory_range_history)
This inspector will try to find targets of indirect jumps in exploration.
__init__(arg2)
Initializes an indirect_call_target_finder.
max_depth | Maximum size of the path to backtrack (in sequences). 0 means unlimited -> integer |
Allows to track the history of all memory accesses.
Allows to control when to stop the execution.
__init__(arg2, arg3, arg4)
Initializes an stop_execution.
stop_at_top_level | Leave once the starting function ends -> boolean |
symbol | Leave once a specific symbol is reached -> string |
sequence_number | Leave after translating this number of sequences -> integer |
Will look for and record all strings that are dereferenced throughout the execution.
__init__(arg2, arg3, arg4, arg5, arg6)
Initializes an string_history.
min_invalid_size | Minimum size non null-terminated strings must have to be considered -> integer |
min_valid_size | Minimum size null-terminated strings must have to be considered -> integer |
max_size | Maximum size of a string (allows to overlook temporary buffers) -> integer |
max_string_worker | Maximum size of current strings to consider and keep in RAM -> integer |
utf-16 | Will look for utf-16 strings as well. -> boolean |
Will track all the allocations, deallocations, deref and then detect memory errors (use after free, double free...) in Windows.
Represents a memory access.
Member | Type | Documentation |
---|---|---|
size | integer | Size of the memory access |
content | integer | Content of the memory after the access |
instruction_index | integer | Instruction index for this memory access |
run_id | integer | Run identifier where the memory access occurred |
read | boolean | True if the memory was accessed for reading |
timestamp | integer | Timestamp for this memory access |
tsc | integer | Tsc timestamp of the memory access |
logical | logical_address | Logical address used to access the memory |
allocation | boolean | True if this is an allocation type of access |
write | boolean | True if the memory was accessed for writing |
free | boolean | True if this is a deallocation type of access |
execution | boolean | True if the memory was accessed for execution |
physical | physical_address | Physical address used of the memory |
A running process.
Member | Type | Documentation |
---|---|---|
address_spaces | list(process_address_space) | Address spaces |
pid | integer | Process identifier |
name | string | Process name |
An address space of a process.
Member | Type | Documentation |
---|---|---|
end | integer | End of the address space |
name | string | Name of the mapped file |
read | boolean | Read permission on the address space |
write | boolean | Write permission on the address space |
start | integer | Start of the address space |
file_offset | integer | Offset of the address space inside its file |
execution | boolean | Exec permission on the address space |
A process switch during a run.
Member | Type | Documentation |
---|---|---|
cr3 | integer | New process CR3 |
pid | integer | New process identifier |
point | execution_point | Execution point when the switch occurred |
Execution point inside a trace.
__init__(run_name, sequence_identifier, instruction_index)
Create an execution point of the specified run point.
run_name | The name of the referenced run -> string |
sequence_identifier | Index of the sequence inside the run -> integer |
instruction_index | 0-based index of the instruction inside the sequence -> integer |
__init__(sequence_identifier, instruction_index=0)
Create an execution point of the point for the main run.
sequence_identifier | Index of the sequence inside the main run -> integer |
instruction_index | 0-based index of the instruction inside the sequence -> integer |
valid()
Returns true if the execution point is valid.
The execution point is only tested for its validity against the sequence identifier. More precisely, this function returns true if the sequence identifier is not the root sequence identifier.
Member | Type | Documentation |
---|---|---|
instruction_index | integer | Instruction index |
sequence_identifier | integer | Sequence identifier |
run_name | string | Name of the run |
An range of sequences or instructions inside an execution.
__init__(run_name, sequence_identifier, range, instruction_index)
Create an execution range from the specified arguments.
run_name | The name of the referenced run -> string |
sequence_identifier | Index of the sequence inside the run -> integer |
range | Number of sequences or instructions in the range -> integer |
instruction_index | 0-based index of the instruction inside the sequence -> integer |
__init__(sequence_identifier, range, instruction_index)
Create an instruction-based execution range from the specified arguments (begins at the specified sequence/instruction and end after 'range' instructions).
sequence_identifier | Index of the sequence inside the main run -> integer |
range | Number of sequences or instructions in the range -> integer |
instruction_index | 0-based index of the instruction inside the sequence -> integer |
__init__(sequence_identifier, range=1)
Create a sequence-based execution range from the specified arguments (begins at the first instruction of the specified sequence and end at the beginning of 'sequence_identifier' + 'range'.
sequence_identifier | Index of the sequence inside the main run -> integer |
range | Number of sequences in the range -> integer |
begin()
Returns the start execution point of this range
valid()
Returns true if the execution point is valid.
The execution point is only tested for its validity against the sequence identifier. More precisely, this function returns true if the sequence identifier is not the root sequence identifier.
end()
Returns the end execution point of this range
Member | Type | Documentation |
---|---|---|
instruction_index | integer | Instruction index in the sequence, -1 if referencing the whole sequence |
range | integer | The range of values. Either an instruction range if instruction_index_ is positive, or a sequence range |
sequence_identifier | integer | Sequence identifier |
run_name | string | Name of the run |
Represents a sequence inside a run.
Member | Type | Documentation |
---|---|---|
has_bug | boolean | Sequence bug status |
index | integer | Sequence index |
run_id | integer | Run index |
has_children | boolean | Does this sequence have children ? |
sequence | mini_sequence | Sequence |
trace_infos | dict(integer -> string) | Trace information of the sequence |
children_have_bugs | boolean | Childrens sequences bug status |
first_child_symbol | symbol | Symbol of the first child |
symbol | symbol | Symbol of this sequence |
Represents a sequence with its instructions.
Member | Type | Documentation |
---|---|---|
sequence | sequence_in_run | Sequence |
instructions | list(instruction) | Instructions the sequence |
Criterion regarding a sequence address.
__init__(address, effect=reven.filter_criterion_effect.match, enabled=True)
Create a filter criterion that matches sequences that contain the specified address.
address | Addres of the sequences to match -> integer |
effect | Tweak the meaning of the criterion -> filter_criterion_effect |
enabled | True if the criterion should be enabled at creation -> boolean |
Member | Type | Documentation |
---|---|---|
enabled | boolean | Whether this criterion is enabled |
effect | filter_criterion_effect | Effect |
address | integer | Address |
Generic criterion.
Member | Type | Documentation |
---|---|---|
enabled | boolean | Whether this criterion is enabled |
effect | filter_criterion_effect | Effect |
Criterion regarding a binary's name.
__init__(regexp, effect=reven.filter_criterion_effect.match, enabled=True)
Create a filter criterion whose regular expression will be matched against a binary's name.
regexp | Regexp of the binary to match -> string |
effect | Tweak the meaning of the criterion -> filter_criterion_effect |
enabled | True if the criterion should be enabled at creation -> boolean |
Member | Type | Documentation |
---|---|---|
enabled | boolean | Whether this criterion is enabled |
effect | filter_criterion_effect | Effect |
name | string | Regular expression |
Criterion regarding a sequence that does a device access.
`__init__(device='', subdevice='', effect=reven.filter_criterion_effect.match, enabled=True)`
Create a filter criterion that matches sequences that access the specified device/subdevice.
device | Device to match -> string |
subdevice | Subdevice to match -> string |
effect | Tweak the meaning of the criterion -> filter_criterion_effect |
enabled | True if the criterion should be enabled at creation -> boolean |
Member | Type | Documentation |
---|---|---|
device | string | Device name |
enabled | boolean | Whether this criterion is enabled |
effect | filter_criterion_effect | Effect |
subdevice | string | Subdevice |
Allows to tweak the meaning of a criterion
Enum | Documentation |
---|---|
invert_match | Inverts the meaning of the criteria (NOT) |
match | Normal meaning of the criteria |
Criterion regarding a symbol's name.
__init__(regexp, effect=reven.filter_criterion_effect.match, enabled=True)
Create a filter criterion whose regular expression will be matched against a symbol's name.
regexp | Regexp of the symbol to match -> string |
effect | Tweak the meaning of the criterion -> filter_criterion_effect |
enabled | True if the criterion should be enabled at creation -> boolean |
Member | Type | Documentation |
---|---|---|
enabled | boolean | Whether this criterion is enabled |
effect | filter_criterion_effect | Effect |
name | string | Regular expression |
Single result of a search.
Member | Type | Documentation |
---|---|---|
comment | string | Comment why the result matched |
sequence | sequence_in_run | Sequence of the result |
Criteria for a search.
__init__(filters, need_all=True)
Create a search request from the list of filters.
filters | A list of filters to add to the search initially -> list(filter_criterion_base) |
need_all | True if you need all criteria (AND), False for an OR -> boolean |
__init__(filter)
Create search request from one filter.
filter | The filter to use for the search -> filter_criterion_base |
Member | Type | Documentation |
---|---|---|
need_all | boolean | If true, all criteria need to match (AND), else any criteria need to match (OR) |
max_results | integer | Maximum number of results to return. 0 for infinite. |
max_sequences | integer | Maximum number of sequences to check. 0 for infinite. Acts on top of the range. |
criteria | list(filter_criterion_base) | Criteria |
Result of a search.
Member | Type | Documentation |
---|---|---|
content | list(search_item) | Matching items |
remaining_range | execution_range | Range not checked due to a reached limit |
Represents an instruction.
Member | Type | Documentation |
---|---|---|
mnemonic | string | Mnemonic of the instruction |
operand_two | string | Second operand of the instruction, if applicable |
prefixes | string | Prefixes of the instruction |
operand_one | string | First operand of the instruction, if applicable |
offset | integer | Offset of the instruction if memory |
size | integer | Size of the instruction in bytes |
operand_three | string | Third operand of the instruction, if applicable |
Store the data tainting context of an instruction.
Member | Type | Documentation |
---|---|---|
modifies_taint | boolean | Did this instruction modifies taint or not |
tainted_values | list(symbolic) | Tainted symbolics when this instruction is executed |
point | execution_point | The tainted instruction |
Store the taint propagation effect of an instruction.
Member | Type | Documentation |
---|---|---|
new | list(symbolic) | The untainted symbolics |
old | list(symbolic) | The newly tainted symbolics |
Sequence of instructions.
Member | Type | Documentation |
---|---|---|
symbol | symbol | Symbol of the sequence |
size | integer | Size offset of the sequence |
annotations | list(string) | Annotations added to this sequence |
address | logical_address | Address of the sequence |
A symbol inside a a binary.
__init__(name)
Create a symbol with a given name.
name | Name of the symbol to create -> string |
name_offset()
Combines the name and the offset into a single string.
Member | Type | Documentation |
---|---|---|
name | string | Main name of this symbol |
name_index | integer | Index of the selected name |
kernel_symbol | boolean | True if the symbol lies inside the kernel |
binary_name | string | Name of the binary that contains this symbol |
names | list(string) | Names |
offset | integer | Offset |
vma | integer | Virtual memory address of the symbol |
segment | integer | Segment selector of the logical address where the symbol is located |
html_documentation | string | Relative link to the html documentation if available |
List of symbols
Member | Type | Documentation |
---|---|---|
items | list(symbol) | List of items |
range_first_id | integer | First id of the returned chunk. |
collection_size | integer | Size of collection |
Represents a string that's been accessed during the execution.
Member | Type | Documentation |
---|---|---|
content | string | String content |
creation_sequence | integer | Sequence id where this string was created |
valid_string | boolean | True if this string is valid |
unique_id | integer | Unique ID |
address | logical_address | String address |
Represents a string that's been accessed during the execution.
Member | Type | Documentation |
---|---|---|
symbols | list(string) | Symbol names of the string is accessed (same order as first list |
is_write | list(byte) | Booleans indicating if the string is written -> list(boolean) |
unique_id | integer | Unique ID |
sequences | list(integer) | Sequences where the string is accessed |
List of strings
Member | Type | Documentation |
---|---|---|
items | list(dereferenced_string) | List of items |
range_first_id | integer | First id of the returned chunk. |
collection_size | integer | Minimum known size of collection (actual size may be bigger) |