In 1980s Cyberpunk science fiction, a cyberdeck is a device used to access the virtual representation of Cyberspace. It is a simulated, “consensual hallucination” that facilitates the handling and exchange of massive data, humanity’s extended electronic nervous system. The deck is connected to a tiara-like device that operates by using electrodes to stimulate the user’s brain while drowning out other external stimulation. A standard cyberdeck is about the size of a paperback book, is made of plastic and weighs about half a kilogram. A standard trope in the fiction was users with these devices testing and penetrating data networks via this virtual reality device. Most of this fiction was set in the first half of the 21st century.

Oculus is an American technology company founded in July 2012 in Irvine, California, now based in Menlo Park. It specializes in virtual reality hardware and software products. Palmer Luckey, a Head-Mounted Display designer at the University of Southern California, earned a reputation for having the largest personal collection of HMDs in the world and was a longtime moderator in Meant to be Seen’s discussion forums. Through MTBS’s forums, Palmer developed the idea of creating a new head-mounted display that was both more effective than what was currently on the market and was also inexpensive for gamers. To develop the new product, Luckey founded Oculus VR.

Samsung Gear VR is a virtual reality headset developed by Samsung Electronics in collaboration with Oculus VR and manufactured by Samsung. The headset was first released on November 27, 2015. When in use, a compatible Samsung Galaxy device acts as the headset’s display and processor, while the Gear VR unit itself acts as the controller, which contains the field of view, as well as a custom Inertial Measurement Unit, for rotational tracking, which connects to the smartphone via USB-C or micro-USB. The Gear VR headset also includes a touchpad and back button on the side, as well as a proximity sensor to detect when the headset is on.

The Tri-fold Wireless Ultra-Slim Portable Bluetooth Keyboard with touchpad function is a keyboard from Jelly Comb with convenience and mini size for the user. Made of aluminium, ultra-slim foldable design and pocket size. It has workmanship of Aircraft-grade aluminium for superior stiffness, light & fast heat dissipation, and sleek design. Compatibility QWERTY layout with hotkeys, compatible with iOS / Mac OS, Android, Windows and all Bluetooth enabled devices using the advanced Bluetooth 3.0 chip, providing high-speed connection and signal distance up to 15m.

Termux is an Android terminal emulator and Linux environment application that works directly with no rooting or setup required. A minimal base system is installed automatically, additional packages are available using the APT package manager. Termux combines powerful terminal emulation with an extensive Linux package collection.

Kali Linux is a Debian-derived Linux distribution designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security. It is a sophisticated, modern-day Linux distribution aimed at penetration testers and security experts. Kali comes with a pre-installed set of advanced, security-focused tools such as Nmap, Aircrack-ng, and Wireshark. If you’re a security enthusiast or a starting ethical hacker, this can be the ideal platform for you. Kali has become the de-facto platform for security professionals due to several reasons. It includes most of the tools required in modern penetration testing, such as tools for reconnaissance and delivering payloads.

The Kali Linux NetHunter project is the first open-source Android penetration testing platform for Google-based devices, created as a joint effort between the Kali Linux community member BinkyBear and Offensive Security. NetHunter supports Wireless 802.11 frame injection, one-click MANA Evil Access Point setups, HID keyboard (Teensy like attacks), as well as BadUSB MITM attacks and is built upon the sturdy shoulders of the Kali Linux distribution and toolsets. The software on Kali Linux NetHunter Edition is the same as the parent OS but designed to be suitable for the Arm processor chip used in smartphones.

Red Hawk is a Kali Linux all-in-one tool for information gathering and vulnerability scanning. It is a PHP based web application scanner used for information gathering purpose. Red Hawk detects Content Management Systems in use on a target web application, IP address, web server record, Cloudflare information, and robots.txt data. It can detect WordPress, Drupal, Joomla, and Magento CMS. Other scanning features of Red Hawk include WHOIS data collection, Geo-IP lookup, Banner grabbing, DNS lookup, port scanning, sub-domain information, reverse IP, and MX records lookup. As a vulnerability scanner, Red Hawk looks for error based SQL injections, WordPress sensitive files, and WordPress version related vulnerabilities.

Samsung PhoneCast VR allows you to view your favourite mobile media content on the Gear VR. You can mirror compatible 2D mobile media applications on a virtual 200-inch screen with a scenic 360-degree background. You can enjoy viewing your favourite mobile video application in your private theatre at a scenic lakeside campground. To do more than viewing you can ‘Go to Labs’. Here Samsung brought mobile applications, installed on your device into your VR world so you can do anything else you can do on your mobile phone in immersive 3 dimensional VR.

To get started building a portable pentesting and Linux VR workstation with the above hardware and software, first install Termux on your Samsung Galaxy device. Open the Termux page in the Google Play Store or F-Droid and click on download. To get Termux working as a regular Linux system, first, open it and run:

pkg update && pkg upgrade

Regardless of using a Bluetooth physical keyboard, you will still need a good Android keyboard for when you are using Termux without it. The Hacker’s Keyboard has the missing key layout you’re used to from your computer when using an Android device without a physical keyboard. This software keyboard has separate number keys, punctuation in the usual places, and arrow keys. It is based on the AOSP Gingerbread soft keyboard, so it supports multitouch for the modifier keys. This or an alternative are needed with Samsung devices as Samsung keyboards show behaviour not expected by Android API.

Termux:Styling, is a Termux add-on app to customize the terminal font and colour theme. It will allow you to customise your Termux terminal to fit the aesthetics that you desire. For installation, the Termux:Styling application can be obtained from Google Play or F-Droid. Important: Do not mix installations of Termux and Addons between Google Play and F-Droid. They are presented at these portals for your convenience. There are compatibility issues when mixing installations from these Internet portals.

This is because each download website uses a specific key for key-signing Termux and Addons. When developing (or packaging), note that this app needs to be signed with the same key as the main Termux app to have the permission to modify the required font or colour files.

How to use:

When inside Termux, long press anywhere on the terminal. Select More… in the resulting dialogue. Select Style in the next dialogue. Click either CHOOSE COLOR or CHOOSE FONT depending on what you want to customize.

To access shared and external storage in Termux you need to run the below command. You will then be prompted to “Allow Termux access photos, media and files on your device”, which you should allow.

termux-setup-storage

Shared storage will then be available in the ~storage directory in Termux. The contents of the created folder are symlinks to different storage folders on your device.

Vim is a highly configurable text editor for efficiently creating and changing any kind of text. It is included as “vi” with most Unix-based systems and with Apple OS X. You can install vim in Termux with:

pkg install vim

The Ultimate Vim Configuration has Vim configurations based on the author’s decade of Vim usage. There are two versions:

The Basic: If you want something small just copy basic.vim into your ~/.vimrc and you will have a good basic setup

into your and you will have a good basic setup The Awesome: Includes a ton of useful plugins, colour schemes, and configurations

The basic version is useful to install on remote servers where you don’t need many plugins, and you don’t do a lot of the main editing. This version should be fine for a retrofuturist/low-fi themed Android-based terminal.

git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime

sh ~/.vim_runtime/install_basic_vimrc.sh

The Z shell (Zsh) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many useful improvements for day-to-day usage, including some features of bash, ksh, and tcsh. Oh My Zsh is an open-source, community-driven framework for managing your zsh configuration. To install zsh and Oh My Zsh on Termux, update the Packages:

pkg up

Install the required packages (curl, git,zsh and nano):

pkg install curl

pkg install git

pkg install zsh

pkg install nano

Clone the Oh My Zsh Github repository:

git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

Create a New ZSH configuration file:

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

Set up a theme for your Terminal (the agnoster ZSH Theme is popular although I prefer the default robbyrussell theme) You can select one from the full list of Oh My Zsh Themes). Open .zshrc an editor:

vi .zshrc

Find the line ZSH_THEME=”robbyrussell” replace robbyrussell with agnoster theme in the .zshrc file.

ZSH_THEME="agnoster"

Use Z-shell as Default Shell:

chsh -s zsh

For Fish Shell-like syntax highlighting install ZSH Syntax Highlighting for Oh My Zsh:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh-syntax-highlighting" --depth 1

Now add the syntax-highlighting to .zshrc configuration:

echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> "$HOME/.zshrc"

Termux-Banner is a banner maker script. It’s simply for giving your terminal a retrofuturist aesthetic when opened in VR. To install it for Zsh follow the below steps and enter in your banner messages when it asks:

git clone https://github.com/Bhai4You/Termux-Banner cd Termux-Banner/zsh chmod +x requirement.sh chmod +x t-ban.sh bash requirement.sh bash t-ban.sh

CMatrix is based on the screensaver from The Matrix website. It shows text flying in and out in a terminal like as seen in “The Matrix” movie. It can scroll lines all at the same rate or asynchronously and at a user-defined speed. The only purpose of this is for the cyberpunk aesthetics it provides in your terminal when viewed in VR.

pkg install cmatrix cmatrix

CMatrix by default operates in eye candy mode. It must be aborted with Ctrl C or by pressing q . If you wish for more of a screen saver effect, you must specify -s on the command line. For usage info, use cmatrix -h .

Tmux is a terminal multiplexer: it enables several terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached. It will be needed to manage user input into a terminal screen in the VR environment. To install and run tmux just type the commands:

pkg install tmux tmux

To split your single pane into a left and a right pane you press Ctrl and b at the same time, release both, and then type the % key. Where there’s a split into left and right, there’s also a split into top and bottom pane. To split a pane into the top and bottom panes use the C-b " shortcut.

Switching to a different pane uses the C-b <arrow key> shortcut, where <arrow key> is the arrow key pointing to the pane you want to switch to. Closing a pane is as simple as closing a regular terminal session. Either type exit or hit Ctrl-d and it’s gone.

Creating new windows is done with typing C-b c . The new window will then be presented to you in tmux’s status bar. This window can be divided into panes as above. To switch to the previous window (according to the order in your status bar) use C-b n and to switch to the next window use C-b n .

If you’ve created many windows you might find it useful to go to a window directly by typing its number (the status bar will tell you which window has which number), just use C-b <number> where <number> is the number in front of the window’s name in your status bar.

Neofetch is a command-line system information tool written in bash 3.2+ . Neofetch displays information about your operating system, software and hardware in an aesthetic and visually pleasing way. The information by default is displayed alongside your operating system’s logo. It’s a useful application to have on a Linux-based workstation for information purposes. You can further configure Neofetch to instead use an image, a custom ASCII file, your wallpaper or nothing at all. It can be installed and run with the following two commands:

pkg install neofetch neofetch

Tracepath, traces the path to a network host discovering MTU along this path. It is similar to traceroute, only it does not require superuser privileges and has no fancy options. tracepath is a good replacement for traceroute and classic example of an application of Linux error queues. It traces the given IP by hopping from many devices/IP until it meets its target. This tool is named ‘tracepath’. Located at the stable repository. You need to install it first then you can perform tracing.

pkg install tracepath

Then the commands are:

tracepath [IP address or hostname]

SSH provides a secure way for accessing remote hosts and replaces tools such as telnet, rlogin, rsh, FTP. Termux provides SSH via two packages: dropbear and OpenSSH. If you never used these tools before, it is recommended to install OpenSSH as it is more common.

pkg install openssh

This allows you to connect from your Android to your desktop or servers by SSH connection. To login to a remote machine where the ssh daemon is running at the standard port (22):

ssh user@hostname_or_ip

Same as above, but if the ssh daemon running on a different port, e.g. 8022:

ssh -p 8022 user@hostname_or_ip

Using public key authentication with ssh running on the standard port and a private key stored in the file `id_rsa`:

ssh -i id_rsa user@hostname_or_ip

Note, that if id_rsa and will be stored in ~/.ssh directory, you can omit to specify it in the command. But if you have multiple keys, it is necessary to pick a specific key with -i {path_to_privkey}

If you wish to use an SSH agent to avoid entering passwords, the Termux OpenSSH package provides a wrapper script named ssha (note the a at the end) for ssh, which:

Starts the ssh-agent if necessary (or connect to it if already running).

Runs the ssh-add

Runs the ssh and with the provided arguments.

This means that the agent will prompt for a key password at first run, but remember the authorization for subsequent runs.

The Kali NetHunter App Store is an installable catalogue of Android applications for penetration testing and forensics. It provides the Kali NetHunter Rootless Edition which can be installed on any stock, unrooted Android device without voiding the warranty. Install the NetHunter-Store app and from there install the NetHunter installer, updater, and interface for Kali Linux on Android. Then to make NetHunter available in Termux, open a Termux terminal and type:

pkg install wget wget -O install-nethunter-termux https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-project/raw/master/nethunter-rootless/install-nethunter-termux chmod +x install-nethunter-termux ./install-nethunter-termux

After this has completed start a NetHunter session and update the installation with the following commands:

nethunter apt update && apt full-upgrade

If you have plenty of storage space available you might want to run apt install kali-linux-full as well.

Now, you need to download the Red Hawk scanning tool by typing in your Termux Kali NetHunter session:

After downloading the tool you can run it with:

cd RED_HAWK/ php rhawk.php

Your phone doesn’t come with the Gear VR software already installed, so you need to download it. To do that, you need to:

Insert your phone into the Gear VR. Wait for a voice instructing you to remove the phone. Remove your phone from the Gear VR. Read the Agreement on the screen and tap Agree, then Next. Tap Install to download the Gear VR software.

How to set up your Gear VR software and pair your Gear VR Controller:

Open the Oculus App on your phone. Sign in with your Facebook account. Tap Update Now to get the latest Gear VR software, Tap Pair and hold down the Home button on your Gear VR Controller to connect, Calibrate your Gear VR controller using the on-screen video guide

Tap Left Handed or Right Handed to set Gear VR Controller preference,

And you’re finished! Your Gear VR is now fully ready to be used.

It’s advisable to now get the folding keyboard or another Bluetooth keyboard of your choice paired and working with your Samsung Galaxy device to be able to interact with the Termux terminal in VR. A full-sized keyboard is advisable as this will be easier to touch-type on when used in VR. In Android, enable Bluetooth if it isn’t already on. To enable Bluetooth, simply go to Settings > Bluetooth and tap the slider button to “On”.

Turn on your Bluetooth keyboard and put it into pairing mode. It will usually go into pairing mode automatically after you turn it on, though some keyboards may require an extra step. On the Bluetooth screen, your Android device should automatically search for and find your keyboard. When Android finds your keyboard, select it under “Available Devices” and you should be prompted to type in a code. If successful, you will see that the device is now “Connected” and you’re ready to go.

If you find during use the key mappings are a mess, i.e you can't use the esc button in vim etc, making sure the right language (e.g. English, UK) is set in the Android Bluetooth keyboard settings should fix that.

While it’s true that main Samsung PhoneCast VR functionality is only available with specific compatible apps, your options open up dramatically if you are to opt-in for Samsung Labs. This is an unstable version of the app, and you’ll need to agree to some terms and conditions before you can access it. Once you do that and have installed the PhoneCast VR Beta from the Oculus Gear VR Store though, you’ll be able to launch just about any app that is installed on your phone.

As first demonstrated by Reddit user -sxp- in the HMDProgramming sub you can open the PhoneCast app, navigate to Go to Labs, and from here you can run the available apps on your phone which include a Termux session. This will now be configured as above as with zsh, vim, network diagnostic tools, and Kali NetHunter with Red Hawk on a 200 inch immersive VR screen in a 3D VR setting.

This video is a demonstration of the complete set-up, running the Red Hawk pentesting scanner in Kali Linux NetHunter in Tmux alongside Neofetch in VR. Tested use cases are editing scripts with Vim, running basic network diagnostics like traceroute, and pentesting my app server with NetHunter; all in immersive VR.

The hardware consisting of just two physical pieces, the VR headset (with the attached smartphone) and foldable keyboard combined with the software consisting of standard Linux workstation and security tools demonstrate the functionality and aesthetics of the fictional cyberpunk cyberdeck as a modern useful workstation and pentesting device.

Update 2020–03–13: This set-up goes great with a Bluetooth tethered Raspberry Pi Zero W-based Pwnagotchi. The pentesting VR rig/workstation gets an adorable connected semi-autonomous little AI buddy, that learns from its surrounding WiFi environments to collect crackable WPA material including full and half WPA handshakes as well as PMKIDs, to automatically audit Wi-Fi keys.