> For the complete documentation index, see [llms.txt](https://docs.hex-rays.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hex-rays.com/add-ons/malware/concepts/emulators.md).

# Emulators

The add-on uses three emulators to run samples without risk to your system. The features choose the emulator for you, and some features let you select it in their settings.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h3><strong>Speakeasy</strong></h3></td><td>The Windows API emulator for interactive emulation and the Speakeasy sandbox.</td><td></td><td><a href="https://docs.hex-rays.com/add-ons/malware/concepts/emulators/speakeasy.md">Speakeasy</a></td></tr><tr><td><h3><strong>Sogen</strong></h3></td><td>The Windows system emulator that runs a real Windows user land.</td><td></td><td><a href="https://docs.hex-rays.com/add-ons/malware/concepts/emulators/sogen.md">Sogen</a></td></tr><tr><td><h3><strong>Bochs</strong></h3></td><td>The x86 PC emulator that the unpacker uses by default.</td><td></td><td><a href="https://docs.hex-rays.com/add-ons/malware/concepts/emulators/bochs.md">Bochs</a></td></tr></tbody></table>

## Choose an emulator

[Speakeasy](https://docs.hex-rays.com/add-ons/malware/concepts/emulators/speakeasy.md) and [Sogen](https://docs.hex-rays.com/add-ons/malware/concepts/emulators/sogen.md) are both isolated full system emulators for Windows programs. They are comparable, but they have different strengths and weaknesses, because their architecture is substantially different. Sogen emulates Windows at the syscall layer and runs a real Windows user land. Speakeasy emulates Windows at the API level, with hooks written in Python.

In general, if you have a Windows license and you set up the [Sogen root](https://docs.hex-rays.com/add-ons/malware/concepts/emulators/sogen.md#sogen-root), Sogen is probably a good default. It is fast and reliable, and its behavior is very close to that of Windows. But if you do not have a Windows license, or you have not set up the Sogen root, Speakeasy is trivial to get started with and works in many, many scenarios. It requires a little less to get up and running, and it is possibly even more flexible and hackable, because it is written in Python.

[Bochs](https://docs.hex-rays.com/add-ons/malware/concepts/emulators/bochs.md) emulates a full x86 PC, and IDA's Bochs debugger runs the sample with a minimal Windows kernel. Calls to the Windows API go to stubs that return 0. This is enough for many unpacking stubs, so Bochs is the default backend of the unpacker.

|                                                                                                              | Speakeasy                                     | Sogen                                                                  | Bochs                                                      |
| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------- |
| Emulates                                                                                                     | The Windows API, with hooks written in Python | The Windows kernel at the syscall layer, with a real Windows user land | A full x86 PC, with a minimal Windows kernel and API stubs |
| Windows files                                                                                                | None. All files come with the emulator.       | A Sogen root from Windows media, which needs a Windows license         | None on Linux and macOS. On Windows, the system DLLs.      |
| Setup                                                                                                        | None                                          | Set up the Sogen root one time                                         | None                                                       |
| Speed                                                                                                        | Fast enough to step through code              | Faster, because it is a compiled binary                                |                                                            |
| Sample types                                                                                                 | 32-bit and 64-bit PE files                    | 64-bit PE files, and 32-bit PE files through WOW64                     | 32-bit and 64-bit PE files                                 |
| Network                                                                                                      | Simulated. The sample gets decoy replies.     | Offline by default. `live` uses the network of your host.              | None                                                       |
| [Isolated system emulation](https://docs.hex-rays.com/add-ons/malware/concepts/isolated-system-emulation.md) | Yes, the default                              | Yes                                                                    | No                                                         |
| [Sandbox integration](https://docs.hex-rays.com/add-ons/malware/concepts/sandbox-integration.md)             | Yes                                           | No                                                                     | No                                                         |
| [Automated unpacking](https://docs.hex-rays.com/add-ons/malware/concepts/automated-unpacking.md)             | Yes                                           | Yes                                                                    | Yes, the default                                           |
| Source                                                                                                       | Python, MIT license                           | C++, GPL-2.0 license                                                   | C++, LGPL-2.1-or-later license                             |

For a sample that detects emulators or fails in all of them, use a full system sandbox such as VMRay, or a real debugger in a VM that you can restore.

If you have a question, an idea, or a problem, email <support@hex-rays.com>. The Malware Analysis team reads every message and replies quickly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hex-rays.com/add-ons/malware/concepts/emulators.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
