Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.


A universal, portable, cross-platform security platform based on a RPi Zero You can find the first article here:


First get an sd card for in the Rpi zero formatted with a Raspbian image (may be the lite one).

unzip raspbian_lite_latest #will unzip an .img file 

fdisk -l #lookup the device name of your SD-card (ex. /dev/mmcblk1)
dd bs=4M if=2017-09-07-raspbian-stretch-lite.img of=/dev/mmcblk1 conv=fsync #change /dev/mmcblk1

You may want to resize the last partition to the full size

$ fdisk /dev/mmcblk1 #change /dev/mmcblk1 to your device

Welcome to fdisk (util-linux 2.30.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/mmcblk1: 29.8 GiB, 32026656768 bytes, 62552064 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: 0x11eccc69
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 8192 93813 85622 41.8M c W95 FAT32 (LBA)
/dev/mmcblk1p2 94208 62552063 62457856 29.8G 83 Linux
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): n
Partition type
 p primary (1 primary, 0 extended, 3 free)
 e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2048-62552063, default 2048): 94208
Last sector, +sectors or +size{K,M,G,T,P} (94208-62552063, default 62552063):
Created a new partition 2 of type 'Linux' and of size 29.8 GiB.
Partition #2 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: n
Command (m for help): w 
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Now mount the partitions and change some basic files

mkdir boot
mount /dev/mmcblk1p1 boot #change mmcblk1 part into your device
mkdir root
mount /dev/mmcblk1p2 root #change mmcblk1 part into your device

echo -e 'dtoverlay=dwc2\ngpu_mem=16' >> boot/config.txt
echo -e "dwc2\ng_ether" >> root/etc/modules

echo -e "\nallow-hotplug usb0\niface usb0 inet static\naddress\nnetmask\nnetwork\nbroadcast\ngateway" >> root/etc/network/interfaces

touch boot/ssh

Copy the software packages

cd root/home/pi
git clone

Make it start up a hotspot

sudo sed --in-place "/exit 0/d" root/etc/rc.local
echo -e "\n/bin/sh /home/pi/HackOTG/\nexit 0\n" >> root/etc/rc.local

Sync and unmount

unmount boot root


Now you can SSH to this device with the default credentials (user: pi, pass: raspberry):

ifconfig usb0
ssh pi@

To install the dependencies needed for all the articles, run the following script:

sh HackOTG/


A universal, portable, cross-platform security platform based on a RPi Zero







No releases published


No packages published