How To Install python-libemu on Debian 9

In this tutorial we learn how to install python-libemu on Debian 9. python-libemu is x86 shellcode detection and emulation - Python bindings

Introduction

In this tutorial we learn how to install python-libemu on Debian 9.

What is python-libemu

python-libemu is:

libemu is a small library written in C offering basic x86 emulation and shellcode detection using GetPC heuristics. Intended use is within network intrusion/prevention detections and honeypots.

libemu supports:

  • executing x86 instructions
    • reading x86 binary code
    • register emulation
    • basic FPU emulation
  • shellcode execution
    • shellcode detection
      • using GetPC heuristics
      • static analysis
      • and binary backwards traversal
    • Win32 API hooking

Using libemu one can:

  • detect shellcodes
  • execute the shellcodes
  • profile shellcode behaviour

This package has the Python bindings.

There are three methods to install python-libemu on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python-libemu Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python-libemu using apt-get by running the following command:

sudo apt-get -y install python-libemu

Install python-libemu Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-libemu using apt by running the following command:

sudo apt -y install python-libemu

Install python-libemu Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python-libemu using aptitude by running the following command:

sudo aptitude -y install python-libemu

How To Uninstall python-libemu on Debian 9

To uninstall only the python-libemu package we can use the following command:

sudo apt-get remove python-libemu

Uninstall python-libemu And Its Dependencies

To uninstall python-libemu and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove python-libemu

Remove python-libemu Configurations and Data

To remove python-libemu configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge python-libemu

Remove python-libemu configuration, data, and all of its dependencies

We can use the following command to remove python-libemu configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-libemu

Dependencies

python-libemu have the following dependencies:

References

Summary

In this tutorial we learn how to install python-libemu package on Debian 9 using different package management tools: apt, apt-get and aptitude.