> 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/ida-9.5/add-ons/malware/concepts/bochs.md).

# Bochs

[Bochs](https://bochs.sourceforge.io) is an open source x86 PC emulator. It emulates the CPU, memory, and devices of a full PC, so the code runs on an emulated machine and not on your host. IDA includes a [Bochs debugger](/ida-9.5/core/debugger/concepts/remote-debugging/bochs-debugger.md) that controls Bochs through its internal debugger. In [PE mode](/ida-9.5/core/debugger/concepts/remote-debugging/bochs-debugger/bochs-pe-operation-mode.md), IDA loads a Windows PE file into Bochs with a minimal Windows kernel. Calls to the Windows API go to stubs, which return 0 or call a handler that you can write. The debugger also has an [IDB mode](/ida-9.5/core/debugger/concepts/remote-debugging/bochs-debugger/bochs-idb-operation-mode.md), which runs code from the database, and a [disk image mode](/ida-9.5/core/debugger/concepts/remote-debugging/bochs-debugger/bochs-disk-image-operation-mode.md), which boots a Bochs disk image. For breakpoints, watchpoints, and other limits, see the [Bochs debugger FAQ](/ida-9.5/core/debugger/concepts/remote-debugging/bochs-debugger/bochs-debugger-faq.md).

IDA does not include Bochs itself. Usually you must download and install Bochs, and on Linux and macOS you must also supply the Windows system DLLs for PE mode, as described in [Using the Bochs debugger plugin in Linux](/ida-9.5/core/debugger/tutorials/bochs_linux_primer.md).

## ida-bochs-binaries

The add-on includes the open source [ida-bochs-binaries](https://plugins.hex-rays.com/hexrayssa/ida-bochs-binaries/ida-bochs-binaries) plugin, so IDA's Bochs debugger works with no more setup. The plugin is available for free in the IDA plugin repository, so you can also use it without the add-on:

```bash
hcli plugin install ida-bochs-binaries
```

The plugin contains a Bochs 2.8 build for each supported platform, with the BIOS ROM files. When IDA starts, the plugin sets `BXSHARE` so that IDA finds this build. If you already set `BXSHARE`, the plugin does not change it.

On Linux and macOS, the plugin also supplies stub versions of 14 Windows system DLLs, such as ntdll, kernel32, and ws2\_32, for 32-bit and 64-bit PE files. The stubs contain only export tables, which is all that PE mode reads, and no Windows or Wine code. They match the DLLs that the default PE mode startup script declares as `stub`, as described in [Bochs PE operation mode](/ida-9.5/core/debugger/concepts/remote-debugging/bochs-debugger/bochs-pe-operation-mode.md). When you open a database, the plugin sets [`IDABXPATHMAP`](/ida-9.5/core/disassembler/concepts/environment-variables.md#idabxpathmap) to map the stubs to `c:\windows\system32\` in the guest. On Windows, IDA uses the real system DLLs. The plugin does not change `PATH` or the IDA configuration files.

The Bochs binaries are available for Windows x86-64, Windows ARM64, Linux x86-64, Linux AArch64, and macOS on Apple silicon.

Bochs and the stub DLLs are licensed under the [LGPL-2.1-or-later](https://github.com/HexRaysSA/ida-bochs-binaries#license). The export lists for the stubs come from the Wine 9.0 `.spec` files. The source is at [github.com/HexRaysSA/ida-bochs-binaries](https://github.com/HexRaysSA/ida-bochs-binaries), with Bochs as a submodule.

## How the add-on uses Bochs

Bochs is the default backend for [automated unpacking](/ida-9.5/add-ons/malware/concepts/automated-unpacking.md). When `default_debugger` is `bochs`, the unpacker runs the sample in IDA's Bochs debugger and runs its heuristics on the emulated process.

You can also use Bochs directly. Select **Debugger > Select debugger > Local Bochs debugger**, and then start the process as usual. For one-click emulation with a more complete Windows environment, see [isolated system emulation](/ida-9.5/add-ons/malware/concepts/isolated-system-emulation.md), which uses [Sogen](/ida-9.5/add-ons/malware/concepts/sogen.md) or [Speakeasy](/ida-9.5/add-ons/malware/concepts/speakeasy.md).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
