6 days ago
19 Views

How to Install & Use the Ultra-Secure Operating System OpenBSD in VirtualBox « Null Byte :: WonderHowTo

OpenBSD implements security in its development in a way which no some other operating system on the planet does. Learning to use the Unix-like operating system can help a hacker understand secure development, create better servers, along with improve their understanding of the BSD operating system. Using VirtualBox, the OS can be installed within a host to create a fully-featured test environment.

This particular extremely secure operating system boasts features with which no some other OS can compare. While OpenBSD will be often regarded as a server OS, the item can also be used on the desktop or within a virtual machine along with still offer these same security features to regular users. This particular can be valuable to a device which stands a higher risk of being attacked, or to anyone who wants greater protection against the possibility of remote code execution exploits such as those found in Microsoft Windows.

OpenBSD will be derived coming from the Berkeley Software Distribution, or BSD, a Unix-like operating system developed initially at the University of California, Berkeley. Theo de Raadt forked OpenBSD coming from NetBSD in 1995, along with the project continues to develop along with grow today. The OpenBSD project also maintains several some other well-known tools, including OpenSSH along with LibreSSL.

The OpenBSD development team’s focus on security has led to an extensive amount of specific adjustments to the OS. These modifications include memory protections during compilations in order to prevent buffer or integer overflow attacks, extensive use of cryptography, randomization of various system signatures, along with extensive privilege separation. These factors combine to form an extremely secure operating system for servers along with desktops alike. The OpenBSD homepage itself boasts which the system has had “Only two remote holes inside the default install, in a heck of a long time!”

To test along with learn more about the OpenBSD operating system, the item can be installed along with used within a virtual machine, in This particular case, using VirtualBox.

Step 1: Downloading an OpenBSD Image

OpenBSD can be downloaded coming from one of the item’s HTTP/FTP mirrors. Select the location of the mirror closest to your location if you wish for the fastest speed.

Once you’ve selected a mirror, you will be brought to a page with numerous directories. To download the most recent disc image, select the highest Discharge number. The “6.2” folder should include the most recently updated edition as of December 2017, yet This particular will be subject to raise as subsequent releases are made. Once inside the most recent edition directory, there should be numerous subdirectories for different system architectures.

Don’t Miss: Host Your Own Tor Hidden Service having a Custom Onion Address

For most users, amd64 or i386 images will be the most useful. After selecting a system architecture subdirectory, numerous files will be available for download.

Among This particular set, the “install62.iso” file represents the installation image for edition 6.2 of OpenBSD. Click on This particular file to download along with save the item.

Step 2: Preparing VirtualBox

VirtualBox will be one of the simplest virtualization environments for Windows, Mac OS, along with Linux. the item can be downloaded coming from here, or the item can be installed on Debian-based Linux distros like Ubuntu by using apt as inside the command below.

sudo apt-get install virtualbox

Once VirtualBox will be downloaded along with installed, click the “fresh” button at the upper-left of the main window to begin creating the fresh virtual machine.

A window will open requesting a name, type, along with edition. Typing “OpenBSD” into the Name field should lead to the automatic population of the following two selections, yet if not, set Type to “BSD” along with edition to “OpenBSD” 32 or 64-bit.

The next portion of virtual machine configuration will be memory allocation. Generally speaking, the more memory one can grant to a virtual machine, the faster the VM will be able to run. The amount of memory one will be willing to provide to the VM generally depends on the amount of RAM available on the host machine, shown at the right end of the memory slider bar within VirtualBox. A relatively lightweight operating system such as OpenBSD can function having a limited amount of memory if necessary.

At the Hard disk step, choose to “Create a virtual hard disk at This particular point.” OpenBSD will need to be installed within the virtual machine, so a virtual hard drive to install This particular to will be needed.

If you have no need to move the virtual machine image between different virtualization tools, the item’s best to leave VDI selected for the Hard disk file type selection step.

The next selection will be between a dynamically allocated or fixed size virtual hard disk. For most users, dynamically allocated will be the most simple to use, as the item requires the least configuration.

Lastly, the maximum size along with storage location of the virtual hard drive can be set. This particular may be an external hard drive or a specific location on a local drive. The size will be the maximum size to which the virtual hard drive can grow, so if there are considerable size restraints based on hard drive size the item may be worthwhile to limit This particular amount. The base installation size of OpenBSD will be relatively modest, so This particular limit could easily be set to only a few GB.

at This particular point the OpenBSD VM should be available coming from the main VirtualBox menu to be began. To launch the item, simply click the “Start” button at the top of the interface while the OpenBSD virtual machine will be selected.

Once the virtual machine will be began, the item will request a boot medium to start the virtual machine coming from.

Click on the folder icon at the left of This particular selection menu in order to open a file selector.

Here, browse to along with select the OpenBSD ISO image downloaded earlier along with click “Open,” then click “Start” to launch the virtual machine. The OpenBSD installer should at This particular point begin to boot.

Step 3: Installing OpenBSD

On first boot, the OpenBSD image will load a text-based installer environment, as shown inside the image below.

To begin the installation process, type “i” along with press Enter. This particular process includes numerous questions along with configuration options, each of which will be explained having a short statement. The first prompt requests the preferred keyboard format. Type “L” along with press Enter if you wish to list all available options, or simply type “us” or “uk” to set the keyboard format to US or UK English.

The next questions regard network configuration. Within a virtual machine, the network settings are relatively simple to set. Each option, beginning with Available network interfaces until DNS domain name can be responded with by simply pressing Enter, as the default network configuration options should be fine for most users. On a hardware install, the item may be worth taking more care when choosing these settings, depending on your network configuration.

The next option, Password for root account, allows one to set the root password. The will not echo string denotes which when pressing the keys for the password, the item will not be visible, nor will the item be returned to the user after entering. The root password should generally be strong, especially for a server or internet-connected system.

After entering the root password twice, the installer asks if you might like to start the SSH daemon, or background service, by default. While This particular will be not necessary, the item may be useful. To enable the item, press Enter.

The following two questions regard the graphical configuration of the system. If you’d like to use a graphical interface, enable the X Window System by pressing Enter. The next question asks if you might like the X Window System to be began by the xenodm login manager. While This particular isn’t necessary, the item will make installing a different desktop environment easier, as shown later in This particular tutorial. to enable the item, type “yes” along with press Enter.

Next, enter a name along with password for a standard-level user. For security reasons, the item’s best not to run as the root user, so This particular user will be used for most standard desktop operations. For most users, the item will also be worth denying root SSH login for security reasons.

Don’t Miss: How to Make an SSH Brute-Forcer in Python

For the last question in This particular set, enter “?” to see the available time zones, then type your preferred choice coming from the list, or press Enter to continue with the default selection.

Next, the installer will partition the discs. In general, the only disc available for the virtual machine will be fine for the installation. While custom partitioning works even within the virtual machine environment, the default Whole disk MBR selection, abbreviated to “w,” will be an ideal selection for the virtual machine. Press Enter again to continue the installation.

The next portion of the installation allows for “sets” of packages to be selected, downloaded, along with installed. To download them coming from the internet, enter “http” when prompted for the location of the sets. You can define your preferred HTTP proxy along with server, yet the default setting with no proxy will work for most users. Next, sets can be selected, or simply install all of them. Type “done” along with press Enter to begin installing the sets.

After the sets finish installing, the OpenBSD installation should be complete! To start the item, enter “reboot” at the command line along with wait for the system to load. You may find which the system boots back into the installation screen, most likely due to the initial installation media still being loaded, rather than the virtual hard drive. If This particular will be the case, within VirtualBox, select the OpenBSD virtual machine along with click “Settings.” Under the “Storage” menu inside the right pane, right-click on the ISO file shown under “Storage Devices” along with click “Remove Attachment.” Then, restart the virtual machine.

If a login screen such as the one below appears, OpenBSD has installed along with booted coming from its virtual hard drive.

at This particular point, we can log into the OpenBSD desktop environment, along with begin producing adjustments to the operating system.

Step 4: Configuring & Using OpenBSD

After logging in using the username along with password defined during the installation process, the OpenBSD X Window System along with the fvwm window manager will load. This particular will be a very basic graphical environment, yet the item does create a stacking window manager which can be used for visual tasks. A left-click menu will be available when clicking anywhere on the default desktop.

Opening an XTerm window coming from This particular menu will help us install additional packages, some of which will allow us to add additional elements to the desktop environment. Once a terminal window will be open, we’ll use pkg_add to install additional packages. First, run su in a fresh terminal window to gain superuser privileges. at This particular point we can install some additional packages. To replace the default window manager, we’ll install the Xfce desktop environment, the Leafpad text editor, the Thunar file manager, consolekit2 to assist with login session management, along with the Firefox web browser.

pkg_add xfce xfce-extras leafpad thunar firefox consolekit2

After these packages are installed, we can return to our regular user terminal session by typing exit along with pressing Enter. After This particular, we can create a “xsession” startup file, which will launch Xfce at the next login, by running the command below.

echo “exec ck-launch-session startxfce4” > .xsession

This particular command “echoes” the statement within the quotation marks into the file “.xsession.”

at This particular point, you can restart the system. To restart the system, you need to have root privileges, so first sun su Once more to regain a root terminal window, then type reboot along with press Enter to reboot the system. When the virtual machine reboots, Xfce should automatically start.

Once the desktop environment will be installed, OpenBSD will be ready to be used much like any some other Unix-like operating system, including Linux.

The OpenBSD operating system has software in its repository to do practically any task of some other operating systems, including word processors, image editors, along with even games. If a tool isn’t already available, the item can very likely be compiled if the source code will be available.

Using OpenBSD

With Xfce installed, the graphical usage of OpenBSD should be relatively familiar for users of Linux distributions or Unix-like operating systems. The command line environment, ksh, will also generally be familiar to users of Bash. OpenBSD offers extensive documentation, with pages which thoroughly explain the often unfamiliar components of the operating system, such as package management along with system administration. A complete user’s guide will be also available. OpenBSD will be a very powerful, extensible system, along with becoming familiar with the item will be a useful skill for any system administrator, security engineer, or hacker!

I expect which you enjoyed This particular tutorial on OpenBSD! If you have any questions about This particular tutorial or OpenBSD usage, feel free to leave a comment or reach me on Twitter @tahkion.

Cover image by NOAA’s National Ocean Service/Flickr; along with screenshots by TAKHION/Null Byte

Leave a Comment

Your email address will not be published. Required fields are marked *

1 × 5 =