Cooking with REVEN: Announcing the REVEN API cookbook


Nov 09, 2021
by Louis
Categories: REVEN -
Tags: REVEN - Announcement - Api -




We are releasing a book that demonstrates short recipes you can use as building blocks when writing scripts using the REVEN Python API, a cookbook so to speak!

The book is available online and will be included in the packages of the next release of REVEN.

The source for the book itself is available on our GitHub, so feel free to contribute your own use cases or to send patches for existing ones!

Why a cookbook?

We didn’t know ourselves how much we needed a cookbook until it was there! What was previously “tribal knowledge” is now formalized, accessible and easily reproduced, for example how to search multiple functions or to disassemble instructions of a REVEN trace using Capstone.

For new users of REVEN, the cookbook provides a new way of learning that is complementary to the Quick start guide and the API reference, and help to effectively leverage the API right away.

We hope that in time, the recipes will grow in number!

What are recipes like?

Individual recipes can be searched for using the included search engine (thanks to mdbook ❤️), and consists of mostly standalone, short snippets of code that implement a use-case and that you can copy-paste and iterate upon in your own script.

Here is a sample recipe:

Moving to the beginning, end of a function:

from reven2.trace import Transition
from typing import Tuple, Optional

def call_bounds(tr: Transition) -> Tuple[Optional[Transition], Optional[Transition]]:
    """
    Given a transition anywhere inside of a function, this function returns
    the transition at the beginning of the function call and the transition at
    the end of the function call.
    """
    return (tr.step_out(is_forward=False), tr.step_out(is_forward=True))

Want to try the cookbook? An extensive set of learning scenarios is available online, so just visit our Try REVEN page and start a Notebook to practice the API!

Interested in REVEN? Compare the features of REVEN Professional and REVEN Enterprise.

Next post: Launching REVEN Free Edition
Previous post: Announcing REVEN version 2.10