Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Introduction

Metasm is a Ruby library for assembling, disassembling and understanding the code semantics.

Usage

Code was adapted from the Practical Reverse Engineering book and tested with Metasm 1.04 on Ruby 3.0.1.

code_bind.rb shows how to disassemble and extract the semantics of a given code block and sym_exec.rb shows how to execute that same code block by providing a context with arbitrary values.

References

Chapter 5 of the Practical Reverse Engineering book with its accompanying Metasm code exercises (and solutions!) provide the best explanation of how to disassemble and then perform symbolic execution on the disassembled blocks. Exercise 2 is especially instructive.