reven.api.Project(object) class documentationreven.api
(View In Hierarchy)
A reven project. This is the root api object.
Cache: Should the cache be outdated (new comments,
start/resume/pause execution), refresh a project instance with the refresh method.
| Method | __init__ | Connect to a Reven project. |
| Method | host | Property: The reven host. |
| Method | port | Property: The reven port. |
| Method | is_connected | Check the current connection status. |
| Method | connect | Connect to the reven host. |
| Method | disconnect | Disconnect from the reven host. |
| Method | refresh | Refreshes the current instance. |
| Method | status | Get the connection status string. |
| Method | logs | Get the logs generated during the execution of this project. |
| Method | binaries | Get the binaries present in the project. |
| Method | reports | Get the reports emitted by inspectors in the project. |
| Method | devices | Get the devices present in the trace. |
| Method | framebuffer | Get the framebuffer information. |
| Method | processes | Get the processes present in the project. |
| Method | process | Get a process by pid. |
| Method | process_switches | Get the process switches. |
| Method | traces | Get the available traces (main execution run and IRQs). |
| Method | trace | Get a trace by name. |
| Method | search_memory_access | Search for memory accesses. |
| Method | taint | Propagate a taint from an initial point in a given direction. |
| Method | device_history | Get the device accesses in the project. |
| Method | saves | Get a list of available saved executions. |
| Method | save_execution | Save the current execution. If a save with the same name already exists, it will be overwriten. |
| Method | start_execution | Start a new execution. |
| Method | stop_execution | Stop the running execution. |
| Method | resume_execution | Resume the stopped execution. |
| Method | execution_status | The execution progress. |
| Method | map_memory_segment_into_process | Map a memory segment into a process. |
| Method | add_symbols_to_binary | Add symbols to a binary. |
| Method | __repr__ | Undocumented |
| Method | _init_logs | |
| Method | _init_binaries | |
| Method | _init_reports | |
| Method | _init_processes | |
| Method | _init_process_switches | |
| Method | _init_traces | |
| Method | _init_devices |
Connect to a Reven project.
| Parameters | host | The reven host. |
| port | The reven port. | |
| Raises | reven_api.LicenseError | If no license is available. |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
| Raises | RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Check the current connection status.
| Returns | True, if the connection with the server is currently open.
Otherwise, False. | |
| Unknown Field: noraise | RuntimeError | Any connection exception is caught in the method. |
Connect to the reven host.
Use this method after having called disconnect to
renew a connection to the server.
| Raises | RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Disconnect from the reven host.
This method immediately closes the connection to the server. Use this method to avoid locking a license token by keeping connections longer than wanted.
| Note | Closing the last connection to a REVEN server releases its license token.
After calling this method, the After calling this method on a project, objects obtained from the
project such as | |
Refreshes the current instance.
This cleans the current instance's cache, forcing it to query up-to-date information from the server.
Get the connection status string.
| Returns | "connected" if currently connected, "disconnected" otherwise. | |
Get the logs generated during the execution of this project.
Note that the point will always point to the first instruction of the sequence involved in the log if any.
| Returns | A list of tuples describing the log level, message and associated point (or None). | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Get the binaries present in the project.
| Returns | a dictionary that maps a binary path to its corresponding Binary object. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Get the reports emitted by inspectors in the project.
| Returns | A list of Report objects. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Get the devices present in the trace.
| Returns | A list of Device objects. | |
| Raises | RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Get the processes present in the project.
| Returns | A list of Process
objects. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Get a process by pid.
| Returns | The Process object of the
given pid. If none if found, None. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Get the process switches.
| Returns | A list of ProcessSwitch objects. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Get the available traces (main execution run and IRQs).
| Returns | A list of Trace objects. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Get a trace by name.
| Returns | The Trace object of
requested name. If none if found, None. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Search for memory accesses.
| Parameters | addr | The first address in the searched **physical** memory range. |
| size | The size of the searched memory range. | |
| Returns | the list of MemoryAccess objects
which occurred in the specified physical memory range. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Propagate a taint from an initial point in a given direction.
The propagation result is presented as a collection of taint modifications. This allows to get every propagation step but might be confusing for the user.
| Parameters | begin | The initial point to start tainting from. |
| initial_taint | A list of Symbolic
objects considered tainted at the initial point. | |
| forward | A boolean indicating the taint propagation direction. | |
| count | The maximum number of taint propagations to perform. 0 means unlimited. | |
| timeout | An optional time limit in ms. 0 means no timeout, but beware that it can freeze the server for quite long. | |
| Returns | A taint propagation result object of type Taint. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Get the device accesses in the project.
| Parameters | device | An optional device name to match. |
| subdevice | An optional subdevice name to match. | |
| Returns | a list of DeviceAccess. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
Get a list of available saved executions.
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Save the current execution. If a save with the same name already exists, it will be overwriten.
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Start a new execution.
Note that you can only start an execution if the project is awaiting configuration. If you wish to restart a new execution, you should restart the project.
| Parameters | inspector_list | iterable collection of Inspector objects to configure the
execution. If omitted, no inspector will be configured. |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. | |
| AssertionError | If the project is not awaiting configuration. | |
| Exception | If the same Inspector class appears several times in the
inspector_list |
Stop the running execution.
Note this is not blocking, and you should wait for execution_status().is_done to be True before doing anything else.
| Raises | RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Resume the stopped execution.
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
The execution progress.
| Raises | RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Map a memory segment into a process.
| Parameters | cr3 | int representing the cr3 of the process where to map the memory segment. |
| segment | Memory Segment to map. | |
| base_address | (Optional) Base address of the binary the segment belongs to. If not applicable (for example for the stack), it defaults to the segment's address. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Add symbols to a binary.
| Parameters | binary | Path of the binary. |
| symbols | list of Symbol objects to
add in the binary. | |
| Raises | reven_api.ServiceNotAllowedDuringExecutionError | If this method is called during the execution. |
| RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |