Skip to content

Reverse Engineering with DOSBox debug build

DosBox comes with it's own built-in debugger, which can be useful when reversing old DOS games.

This feature needs to be enabled at build time (--enable-debug or --enable-debug=heavy), so either download the special binary or build it from source. I went through the build process in a previous post:

This gives a nice view with registers, dissassembly and memory views:

This VOGONS thread has a quick summary on the DosBox built-in debugger:

Continue reading "Reverse Engineering with DOSBox debug build"

Hacking a DOS 32 bit protected mode game from 1997

It's been a long time since I've looked at X86 assembly, and I thought it might be fun to reverse engineer a game I enjoyed playing when I was much younger - US Navy Fighters.

Hacking tools

IDA (Interactive Dissassembler) - download IDA 8.3 from (free for personal use). I'm using the linux version. To install chmod +xx the installer and accept the license agreement. Choose the install location, I chose idafree-8.3 in my home folder.

chmod +x

Debugger - USNF is a DOS game and won't run on linux natively, however it runs perfectly fine through DOS-Box. The good news is DOS-Box is available as a special debug build, with an integrated debugger. This allows us to set breakpoints, peek at memory locations, etc, and should very helpful in analysing the game. To get the debug build we'll need to build DOS-Box from source. Download the source code from There is some information on the build process on VOGONS.

Download the file: dosbox-0.74-3.tar.gz, and run the build. Install autotools if it's missing. Also, note the SDL 1.2 and curses dependencies:

sudo apt install autoconf autotools-dev automake
sudo apt install libsdl1.2-dev libncurses-dev
tar xvf dosbox-0.74-3.tar.gz
cd dosbox-0.74-3/
./configure --enable-debug=heavy
sudo make install

By default, the binary is installed into /usr/local/bin. I renamed my binary to dosbox-debug to distinguish it from the standard version:

sudo mv /usr/local/bin/dosbox /usr/local/bin/dosbox-debug
Continue reading "Hacking a DOS 32 bit protected mode game from 1997"

Setting up a cyber lab

It is a good idea to be careful when deploying an unknown virtual machine created by someone else. We should not allow it access to the Internet or our local network. In this article I will describe the steps I take to achieve this.


My virtualisation platform of choice is VirtualBox - it is simple to set up, easy to use, and open source. VirtualBox supports importing machines using the Open Virtualization Format (OVF). VirtualBox offers an 'Internal Network' which is completely isolated from the host network environment. We shall connect any unknown virtual machines to this internal network.

Continue reading "Setting up a cyber lab"

Plans for the year ahead - 2021

No can argue it's been an easy year, for now let's think about our plans for the year to come.

I have set some simple goals for 2021:

  • Become more active on the Stack Exchange network
  • Learn as much as possible about cyber security
  • Finish my PC emulator and release it to the public
  • Increase the frequency of my blog posts

Resize an NTFS partition using Linux

Today I spent some time resizing an existing ntfs partition, in order to make space for an LFS build.

Here's the existing partition structure:

# fdisk -l -u /dev/sdb
Disk /dev/sdb: 465.8 GiB, 500106780160 bytes, 976771055 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa7cea7ce

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1  *      2048    206847    204800   100M  7 HPFS/NTFS/exFAT
/dev/sdb2       206848 976766975 976560128 465.7G  7 HPFS/NTFS/exFAT
Continue reading "Resize an NTFS partition using Linux"

How to share a directory over a network using NFS

NFS or Network File System is a quick and easy way to share files between Linux hosts on a network. Client machines are able to mount specific directories on a server machine and access the files as if they are on the client's local filesystem.

Configuring an NFS share is as easy as installing a package and editing a config file. For the steps below I'm using a Debian client and a Ubuntu based server.

Configuring the server

Begin by installing the nfs-kernel-server package if it isn't already installed:

sudo apt-get install nfs-kernel-server
Continue reading "How to share a directory over a network using NFS"

Ubuntu - restart wifi connection without rebooting

Restarting a wifi connection without rebooting

I have a Mythbuntu box who's only connection to the outside world is through a wi-fi connection. It can be frustrating when the connection drops out at a critical time - during an upgrade to the next LTS release for instance. Here are some things to try to reset the connection.


Continue reading "Ubuntu - restart wifi connection without rebooting"

Backup your web server with rsync, mysqldump and tar

In this article I will demonstrate one way to backup up a Debian based web server, together with MySQL databases.

The concepts shown here should easily adapt to work on most Linux distributions.

The tools we will use include rsync, mysqldump and tar.

Continue reading "Backup your web server with rsync, mysqldump and tar"


This is a post for the sole purpose of testing the comments functionality.

Building Ogre3D with Microsoft Visual C++ 14.0 (Visual Studio Community 2015)

Today we will build Ogre3D graphics rendering engine ( using Microsoft Visual C++ 14.0 compiler (Visual Studio Community 2015).

Building Ogre can take some time and things don't always go smoothly, which is why I decided to document the entire process. I will follow the basic process as documented in the official guides:

Just be aware that I may be using a slightly different directory structure within my build. Substitute my paths for yours where applicable.

The latest stable release is 1.9 and has been around for a long time, so it should build without too much trouble.

Continue reading "Building Ogre3D with Microsoft Visual C++ 14.0 (Visual Studio Community 2015)"