If you are in SecOps, you probably have seen the threat of CryptoMiners running on compromised hosts. This article may not be for you, but if you would like to dive deeper inside of the working of crypto-mining you will find a few resources here to get you started.

For the example I use the Moonlander 2 ASIC USB stick as you can pick one up form Amazon for as little as as of March 2020, and it has all the features needed to work with a Raspberry PI. It allows to mine LTC (Litecoin.org).

sudo apt-get install -y build-essential git autoconf automake libtool pkg-config libcurl4-openssl-dev libudev-dev libusb-1.0-0-dev libncurses5-dev raspberrypi-kernel-headerscdmkdir minerscd minerssudo unzip Linux_3.x.x_4.x.x_VCP_Driver_Source.zipcd Linux_3.x.x_4.x.x_VCP_Driver_Sourcemakesudo cp -a cp210x.ko /lib/modules/4.19.0-6-amd64/kernel/drivers/usb/serial

Another example is the GekkoScience Bitcoin SHA256 Stick Miner, which lets you test how to mine BTC (bitcoin.org). 

I use the Raspberry PI, as it is a very low cost environment you can build with your children at a very young age. You can do a lot more with it then just teaching about Bitcoin, Blockchain, and mining.

The resources below have all the documentation necessary to get started.

The Moonlander device tends to lock up after a successful run with and the miner isn’t detected on successive runs with the status message: 

------------------------------------------NO DEVICES FOUND: Press 'M' and '+' to add------------------------------------------

The solution is to remove the driver (cp120x) and unplug / plug back in the USB stick:

  1. unplug USB stick
  2. wait 10 seconds
  3. plug USB stick back in
  4. check if the driver is re-registered by running  the output should look like

Resources

Raspberry Pi 4 on Amazon

Olimex

Moonlander 2 USB Stick ASIC on Amazon

Moonlander 2 USB Stick getting started instructions

Moonlander  ASIC setup on linux

VCP kernel drivers

GekkoScience Bitcoin Miner Setup on Linux / Raspberry Pi

GekkoScience Termius R606 Miner Setup

Raspberry PI dependencies for building kernel modules

ASIC Miner Valuation estimations

US made ASIC miner

Best GPUs for mining ETH