Updated instructions so you can use this repo and the pi-gen repo to create your images

This commit is contained in:
Adam Morris
2022-03-28 21:49:34 -07:00
parent 24682abaa4
commit 6755c5ac13
12 changed files with 146 additions and 3 deletions

14
pi-gen/READMEpm3.md Normal file
View File

@@ -0,0 +1,14 @@
This version of Pi-gen is configured to set up a wifio access point, and SSH.
The default account is username: `dt` password: `proxmark3`
Connect to the `PM3` wifi hot spot with the passphrase `DangerousThings`
Once logged in you will need to compile the PM3 software at the moment.
```
cd proxmark3 && make clean && make -j
sudo make install
```
To remake the image you will need to copy `pm3.config` to `config` and follow the instructions in the `README.md` file

14
pi-gen/config Normal file
View File

@@ -0,0 +1,14 @@
IMG_NAME="Proxmark3"
USE_QCOW2=0
RELEASE="bullseye"
DEPLOY_ZIP=1
USE_QEMU=0
LOCALE_DEFAULT="en_US.UTF-8"
TARGET_HOSTNAME="Proxmark3"
KEYBOARD_KEYMAP="us"
TIMEZONE_DEFAULT="America/Los_Angeles"
FIRST_USER_NAME="dt"
FIRST_USER_PASS="proxmark3"
ENABLE_SSH=1
WPA_COUNTRY="US"
STAGE_LIST="stage0 stage1 stage2 stageDTPM3"

14
pi-gen/pm3.config Normal file
View File

@@ -0,0 +1,14 @@
IMG_NAME="Proxmark3"
USE_QCOW2=0
RELEASE="bullseye"
DEPLOY_ZIP=1
USE_QEMU=0
LOCALE_DEFAULT="en_US.UTF-8"
TARGET_HOSTNAME="Proxmark3"
KEYBOARD_KEYMAP="us"
TIMEZONE_DEFAULT="America/Los_Angeles"
FIRST_USER_NAME="dt"
FIRST_USER_PASS="proxmark3"
ENABLE_SSH=1
WPA_COUNTRY="US"
STAGE_LIST="stage0 stage1 stage2 stageDTPM3"

View File

@@ -0,0 +1,13 @@
git
ca-certificates
build-essential
pkg-config
libreadline-dev
gcc-arm-none-eabi
libnewlib-dev
libbz2-dev
libbluetooth-dev
libpython3-dev
libssl-dev
hostapd
dnsmasq

View File

@@ -0,0 +1,10 @@
#!/bin/bash -e
su - dt
git clone https://github.com/RfidResearchGroup/proxmark3
cd proxmark3
echo PLATFORM=PM3GENERIC > Makefile.platform
#make clean && make -j
exit
#make install

View File

@@ -0,0 +1,35 @@
#!/bin/bash -e
cat << EOF >> /etc/dhcpcd.conf
inteface wlan0
static ip_address=192.168.23.1/24
EOF
mv /etc/dnsmasq.conf /etc/dnsmasq.orig
cat << EOF > /etc/dnsmasq.conf
interface=wlan0
dhcp-range=192.168.23.17,192.168.23.42,255.255.255.0,24h
EOF
cat << EOF > /etc/hostapd/hostapd.conf
interface=wlan0
country_code=US
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ssid=PM3
wpa_passphrase=DangerousThings
EOF
sed -i 's/#DAEMON_CONF=""/DAEMON_CONF="\/etc\/hostapd\/hostapd.conf"/' /etc/default/hostapd

View File

@@ -0,0 +1,16 @@
#!/bin/bash -e
#cd /usr/local/bin
wget https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.aarch64
wget https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.armhf
wget https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.arm
cat << EOF > /usr/local/bin/ttyd
#! /bin/bash
/usr/local/bin/ttyd.`/usr/bin/uname -m` $@
EOF
chown root:root /usr/local/bin/ttyd*
chmod a+x /usr/local/bin/ttyd*

View File

@@ -0,0 +1,4 @@
IMG_SUFFIX="-pm3"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi

View File

@@ -0,0 +1,2 @@
NOOBS_NAME="Raspberry Pi OS Lite PM3 (64-bit)"
NOOBS_DESCRIPTION="A port of Debian with Proxmrk3 but no desktop environment"

5
pi-gen/stageDTPM3/prerun.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash -e
if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi