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"
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
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"
We can mount a bochs disk image from Linx with the following command:
sudo mount -t msdos -o loop,offset=32256 disk.img /mnt/bochs/
The offset of 32256 is correct if the image was created with the Bochs Disk Image Creator, but how can the offset be calculated?
Continue reading "Mount a Bochs disk image"
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"
The Gnome 3 default behaviour for Alt-Tab switching displays applications across all virtual desktops and groups together multiple instances of the same application.
If you find this annoying, the list of applications can be limited to the current virtual desktop, using the command:
Continue reading "Fix broken Alt-Tab behaviour in Gnome 3"
I wrote a utility to write content directly to .vdi files.
Bitbucket repo: https://bitbucket.org/DrSly/patch_vdi/
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"
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"
Today we will build Ogre3D graphics rendering engine (http://www.ogre3d.org/) 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)"
Linux + Apache + MySQL + PHP
Probably the most common installation of web server, at least for a Linux system, is Linux, Apache, MySQL and PHP. Also possible on a Windows system, in which case it would be known as WAMP. I will cover setting up the former here.
I assume you already have a working Debian based Linux distribution. If not then I highly recommend Debian, or for Raspberry Pi users, Raspbian.
Continue reading "Setting up a LAMP server (Linux + Apache + MySQL + PHP)"
There are a few simple steps I consider important to securing a new Raspbian installation:
Continue reading "Securing Raspbian"
- Remove the default pi user
- Prevent root login
- Use ssh key-pair authentication
If your Raspbian image came pre-installled with X.org and GUI components you may want to remove them to free up some space on your partition. It's quite easy to do and highlights some useful commands:
Continue reading "Remove GUI from Raspbian"
Today we will build Boost C++ libraries (http://www.boost.org/) using Microsoft Visual C++ 14.0 compiler (Visual Studio Community 2015).
We will build both 32 bit and 64 bit binaries.
Download and extract files
Download the latest release (at this time Boost 1.59.0 hosted on SourceForge) http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.zip/download
Extract the files to a directory of your choice; I use /lib_source/
I like to keep my third party libraries separate from my own projects. I copy the final compiled binary files to a separate location, depending on the compiler used. For MSVC 2015 the folder is /lib_msvc14 (for MinGW it might be /lib_mingw47). You get the idea.
Continue reading "Building Boost C++ libraries with Microsoft Visual C++ 14.0 (Visual Studio Community 2015)"