├── extras ├── Challenge.jpg ├── credits.txt ├── LOOT_Readme.txt └── a2Te0n2VB.svg ├── case ├── dczia_desk_stand.stl └── DCZia_Badge_case_DC28_Dangle_V3.stl ├── boot_hacks ├── autoplay.sh ├── hyperpixel_setup.sh ├── dczia_setup.sh └── README.md /extras/Challenge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dczia/Defcon28-Badge/HEAD/extras/Challenge.jpg -------------------------------------------------------------------------------- /case/dczia_desk_stand.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dczia/Defcon28-Badge/HEAD/case/dczia_desk_stand.stl -------------------------------------------------------------------------------- /case/DCZia_Badge_case_DC28_Dangle_V3.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dczia/Defcon28-Badge/HEAD/case/DCZia_Badge_case_DC28_Dangle_V3.stl -------------------------------------------------------------------------------- /extras/credits.txt: -------------------------------------------------------------------------------- 1 | ____ ____ ______ ____ ___ ____ ___ 2 | | _ \ / ___|__ (_) __ _ |___ \ / _ \___ \ / _ \ 3 | | | | | | / /| |/ _` | __) | | | |__) | | | | 4 | | |_| | |___ / /_| | (_| | / __/| |_| / __/| |_| | 5 | |____/ \____/____|_|\__,_| |_____|\___/_____|\___/ 6 | 7 | DCZia 2020 8 | Pi Badge Mini 9 | Build a badge with us! 10 | 11 | Credits 12 | Design: LithoChasm & DCZia 13 | Code: Lithochasm, Toasty, Babdor 14 | Challenge: Syntax, Luna 15 | Stickers: WillyK 16 | Case: Syntax 17 | Stand: Babdor 18 | Assistant to the Regional Manager: Bob 19 | Markdown Engineers: Beardbyte, Luna, Lithochasm 20 | Background music while coding: Devin Townsend 21 | 22 | ____ _ _ ____ _ _ ___ ____ _ _ ___ ____ 23 | [__ |__| | | | | | | | | | | [__ 24 | ___] | | |__| |__| | |__| |__| | ___] 25 | 26 | Everyone in DCZia 27 | the #badgelife crew 28 | And!Xor 29 | Internet of Batteries 30 | MalortWare 31 | DC801 32 | 1o57 33 | all the other hackers and makers out there 34 | and DEFCON 28! 35 | 36 | 37 | Sources 38 | Most videos courtesy of Beeple (beeple-crap.com) 39 | Other videos thanks to: 40 | Switzon S Wigfall III - http://www.switzonwigfall.com/vjclips 41 | CMisstress 42 | DJ Catmac 43 | DocOptic 44 | 45 | Music: https://www.bensound.com/royalty-free-music 46 | -------------------------------------------------------------------------------- /boot_hacks: -------------------------------------------------------------------------------- 1 | 2 | #DCZia_Hackz 3 | #Info mostly sourced from: https://himeshp.blogspot.com/2018/08/fast-boot-with-raspberry-pi.html 4 | 5 | gpu_mem=64 6 | disable_overscan=1 7 | 8 | # Force on HDMI 9 | hdmi_force_hotplug=1 10 | hdmi_drive=2 11 | #Force 1080p output 12 | hdmi_group=1 13 | hdmi_mode=16 14 | 15 | # Disable the rainbow splash screen 16 | disable_splash=1 17 | 18 | # Disable bluetooth 19 | dtoverlay=pi3-disable-bt 20 | 21 | # Overclock the Pis SD Card reader from 50 to 84MHz - A good U1 card can do 100 but for compatibility we set 84 22 | # This can only be done with at least a UHS Class 1 card 23 | dtoverlay=sdtweak,overclock_50=84 24 | 25 | # Set the bootloader delay to 0 seconds. The default is 1s if not specified. 26 | boot_delay=0 27 | 28 | # Overclock the raspberry pi. Make sure you have a good power supply. 29 | force_turbo=1 30 | 31 | # Binding keys 1-3 to key1 right ctrl key2 space key3 h 32 | dtoverlay=gpio-key,gpio=21,gpio_pull=up,active_low=1,label=key1,keycode=109 33 | dtoverlay=gpio-key,gpio=20,gpio_pull=up,active_low=1,label=key2,keycode=65 34 | dtoverlay=gpio-key,gpio=16,gpio_pull=up,active_low=1,label=key3,keycode=35 35 | 36 | # Binding joystick up up arrow down down arrow left left arrow right right arrow press esc 37 | dtoverlay=gpio-key,gpio=6,gpio_pull=up,active_low=1,label=joyup,keycode=103 38 | dtoverlay=gpio-key,gpio=19,gpio_pull=up,active_low=1,label=joydown,keycode=108 39 | dtoverlay=gpio-key,gpio=5,gpio_pull=up,active_low=1,label=joyleft,keycode=105 40 | dtoverlay=gpio-key,gpio=26,gpio_pull=up,active_low=1,label=joyright,keycode=106 41 | dtoverlay=gpio-key,gpio=13,gpio_pull=up,active_low=1,label=joypress,keycode=1 42 | -------------------------------------------------------------------------------- /autoplay.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PLAYLIST="${1}" 4 | 5 | #Sets the playlist to play: 6 | # TEST (default) 7 | # DEFAULT 8 | # MOVIES 9 | # C64 10 | 11 | ##Turns off cursor blink on display 12 | setterm -cursor off > /dev/tty1 13 | 14 | ##Clear the term before firing up omxplayer 15 | clear > /dev/tty1 16 | 17 | if [[ -z "${PLAYLIST}" || "${PLAYLIST}" == "TEST" ]] ; then 18 | omxplayer --loop --no-osd -z --no-keys --aspect-mode stretch /home/pi/Defcon28-Badge/videos/ellctor_loop.mp4 > /dev/null 2>&1 & 19 | clear > /dev/tty1 20 | 21 | elif [[ "${PLAYLIST}" == "DEFAULT" ]] ; then 22 | echo "Default Playlist" 23 | ## Play some videos 24 | while true; do 25 | clear > /dev/tty0 26 | omxplayer --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/default.mp4 27 | clear > /dev/tty0 28 | omxplayer --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/DC_Movie.mp4 29 | clear > /dev/tty0 30 | omxplayer --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/DC64.mp4 31 | clear > /dev/tty0 32 | done 33 | # setterm -cursor on > /dev/tty0 34 | 35 | elif [[ "${PLAYLIST}" == "MOVIES" ]] ; then 36 | echo "Movies" 37 | omxplayer --loop --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/DC_Movie.mp4 & 38 | 39 | elif [[ "${PLAYLIST}" == "C64" ]] ; then 40 | echo "C64" 41 | omxplayer --loop --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/DC64.mp4 & 42 | 43 | elif [[ "${PLAYLIST}" == "DCZIA" ]] ; then 44 | clear > /dev/tty1 45 | omxplayer --loop --no-osd -z --no-keys --aspect-mode stretch /home/pi/Defcon28-Badge/videos/dczia2020.m4v > /dev/null 2>&1 & 46 | 47 | elif [[ "${PLAYLIST}" == "DCZIA_W" ]] ; then 48 | clear > /dev/tty1 49 | omxplayer --loop --no-osd -z --no-keys --aspect-mode stretch /home/pi/Defcon28-Badge/videos/dczia2020_wide.m4v > /dev/null 2>&1 & 50 | 51 | elif [[ "${PLAYLIST}" == "ALL" ]] ; then 52 | echo "ALL" 53 | clear > /dev/tty1 54 | for a in /home/pi/Defcon28-Badge/videos/* ; do omxplayer --no-osd -z --no-keys --aspect-mode stretch $a > /dev/null 2>&1 ; clear > /dev/tty1 ; done 55 | fi 56 | 57 | -------------------------------------------------------------------------------- /extras/LOOT_Readme.txt: -------------------------------------------------------------------------------- 1 | ___ ___ .__ .__ ___________ ___________.__ ___ ___ ________ _____ _________ 2 | / | \ ____ | | | | ____ \_ _____/______ ____ _____ \__ ___/| |__ ____ / | \ ____ __ __ ______ ____ \_____ \_/ ____\ / _____/__.__. ____ 3 | / ~ \_/ __ \| | | | / _ \ | __) \_ __ \/ _ \ / \ | | | | \_/ __ \ / ~ \/ _ \| | \/ ___// __ \ / | \ __\ \_____ < | |/ \ 4 | \ Y /\ ___/| |_| |_( <_> ) | \ | | \( <_> ) Y Y \ | | | Y \ ___/ \ Y ( <_> ) | /\___ \\ ___/ / | \ | / \___ | | \ 5 | \___|_ / \___ >____/____/\____/ \___ / |__| \____/|__|_| / |____| |___| /\___ > \___|_ / \____/|____//____ >\___ > \_______ /__| /_______ / ____|___| / 6 | \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/\/ \/ 7 | 8 | so you want the L00T huh!?!? 9 | Well you have to ask yourself one question. can you solve the puzzle? I bet you can scan it! so the rules are simple. find the keyword to the .ZIP for some SWEEEET L007. 10 | all of what you will need will be on the DCZIA Build-A-Badge with us badge, Remember there is more than one way to solve any puzzle! 11 | 12 | with Love, 13 | Apl3xicon, Luna, and syntax 14 | ____ ____ 15 | |oooo| |oooo| 16 | |oooo| .----. |oooo| 17 | |Oooo|/\_||_/\|oooO| 18 | `----' / __ \ `----' 19 | ,/ |#|/\/__\/\|#| \, 20 | / \|#|| |/\| ||#|/ \ 21 | / \_/|_|| |/\| ||_|\_/ \ 22 | |_\/ o\=----=/o \/_| 23 | <_> |=\__/=| <_> 24 | <_> |------| <_> 25 | | | ___|======|___ | | 26 | //\\ / |O|======|O| \ //\\ 27 | | | | |O+------+O| | | | 28 | |\/| \_+/ \+_/ |\/| 29 | \__/ _||| |||_ \__/ 30 | | || || | 31 | [==|] [|==] 32 | [===] [===] 33 | >_< >_< 34 | || || || || 35 | || || || || 36 | || || || || 37 | __|\_/|__ __|\_/|__ 38 | /___n_n___\ /___n_n___\ 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /hyperpixel_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #################################################### 4 | ## 5 | ## ___ ___ _____ 6 | ## | \ / __|_ (_)__ _ 7 | ## | |) | (__ / /| / _` | 8 | ## |___/ \___/___|_\__,_| 9 | ## 10 | ## DCZia 2020 PiBadge Mini Build Scrip 11 | ## 12 | ## Script by @lithochasm & @toasty 13 | ## Shoutout to the DCZia Crew 14 | ## 15 | ## 16 | ## 17 | ## 18 | #################################################### 19 | 20 | 21 | ############################### 22 | #### Get Command Line Options 23 | ############################### 24 | while getopts "dhD:" opt; do 25 | case $opt in 26 | d) # debug 27 | shopt -o -s xtrace 28 | ;; 29 | \?) 30 | echo "Invalid option: -$OPTARG" >&2 31 | exit 1 32 | ;; 33 | :) 34 | echo "Option -$OPTARG requires an argument. Please specify display type" >&2 35 | exit 1 36 | ;; 37 | h) 38 | echo "Halp:" >&2 39 | echo "Currently supported: Hyperpixel Display " >&2 40 | exit 1 41 | ;; 42 | esac 43 | done 44 | 45 | # default case if no options 46 | if (( OPTIND == 1 )); then 47 | echo "Default option" 48 | DISPVAR="WAVESHARE" 49 | fi 50 | 51 | ############################### 52 | #### Setup 53 | ############################### 54 | red=$'\e[1;31m' 55 | grn=$'\e[1;32m' 56 | blu=$'\e[1;34m' 57 | # mag=$'\e[1;35m' 58 | # cyn=$'\e[1;36m' 59 | white=$'\e[0m' 60 | 61 | 62 | clear 63 | echo " $blu" 64 | echo " ___ ___ _____" 65 | echo " | \\ / __|_ (_)__ _" 66 | echo " | |) | (__ / /| / _\` | " 67 | echo " |___/ \\___/___|_\\__,_| " 68 | echo " $red DCzia Badge Setup v1 $white" 69 | echo "" 70 | 71 | echo "$red Please install the hyperpixel display drivers first!" 72 | echo "curl https://get.pimoroni.com/hyperpixel4 | bash $white" 73 | ############################### 74 | #### Check if we have internet 75 | ############################### 76 | ping -q -w 1 -c 1 "$(ip r | grep default | cut -d ' ' -f 3)" > /dev/null && echo "$grn Net Connection Detected! $white" || echo "$red Error Cannont Connect to Net T_T $white" 77 | 78 | 79 | ############################### 80 | #### Install base packages 81 | ############################### 82 | echo "$grn Installing Software $white" 83 | echo "" 84 | 85 | sudo apt-get -y update 86 | #sudo apt-get upgrade 87 | sudo apt-get -y install omxplayer cmake vim git git-lfs chocolate-doom 88 | wget --no-check-certificate http://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip 89 | unzip shareware_doom_iwad.zip 90 | wget https://dczia.s3-us-west-2.amazonaws.com/dczia2020.m4v 91 | mv dczia2020.m4v videos 92 | wget https://dczia.s3-us-west-2.amazonaws.com/L00t.7z 93 | mv L00t.7z extras 94 | echo "" 95 | 96 | 97 | ############################### 98 | #### System Setup Stuff 99 | ############################### 100 | echo "$grn Checking /etc/rc.local $white" 101 | if ! grep -q autoplay /etc/rc.local; then 102 | echo "$red Updating rc.local $white" 103 | sudo sed -i 's/exit 0//g' /etc/rc.local 104 | 105 | fi 106 | 107 | if ! grep -q autoplay /etc/rc.local; then 108 | echo "$red Updating rc.local - Enabling Autoplay $white" 109 | sudo sed -i -e '$a sudo /home/pi/Defcon28-Badge/autoplay.sh DCZIA' /etc/rc.local 110 | sudo sed -i -e '$a exit 0' /etc/rc.local 111 | else 112 | echo "$blu Autoplay already enabled $white" 113 | fi 114 | echo "" 115 | 116 | echo "$grn Checking for DCZia Boot Settings $white" 117 | if ! grep -q "DCZia_Hackz" /boot/config.txt; then 118 | echo "$red Updating /boot/config.txt - Enabling Speed Hacks $white" 119 | #cat /home/pi/Defcon28-Badge/boot_hacks | sudo tee -a /boot/config.txt > /dev/null 120 | #sudo sed -i -e '$a gpu_mem=64' /boot/config.txt 121 | #sudo sed -i -e '$a disable_overscan=1' /boot/config.txt 122 | sudo sed -i -e '$a disable_splash=1' /boot/config.txt 123 | sudo sed -i -e '$a dtoverlay=sdtweak,overclock_50=84' /boot/config.txt 124 | sudo sed -i -e '$a boot_delay=0' /boot/config.txt 125 | sudo sed -i -e '$a force_turbo=1' /boot/config.txt 126 | #sudo systemctl disable triggerhappy.service 127 | sudo systemctl disable dphys-swapfile.service 128 | #sudo systemctl disable keyboard-setup.service 129 | #sudo systemctl disable apt-daily.service 130 | #sudo systemctl disable wifi-country.service 131 | #sudo systemctl disable hciuart.service 132 | #sudo systemctl disable raspi-config.service 133 | #sudo systemctl disable avahi-daemon.service 134 | #sudo systemctl disable rsyslog.service 135 | else 136 | echo "$blu DCZIa Speed Hacks Enabled $white" 137 | fi 138 | 139 | if ! grep -q "quiet" /boot/cmdline.txt; then 140 | 141 | echo "$red Setting up console $white" 142 | sudo sed -i -e '/console/ s/$/ quiet loglevel=3 /' /boot/cmdline.txt 143 | fi 144 | 145 | echo "" 146 | 147 | ######################################### 148 | #### Sets new hostname 149 | ######################################### 150 | host_name=pibadgemini 151 | sudo echo $host_name | sudo tee /etc/hostname 152 | sudo sed -i -E 's/^127.0.1.1.*/127.0.1.1\t'"$host_name"'/' /etc/hosts 153 | #hostnamectl set-hostname $host_name 154 | 155 | ######################################### 156 | #### Change Password 157 | ######################################### 158 | echo -e "raspberry\ndczia2020\ndczia2020" | passwd pi 159 | 160 | 161 | ############################### 162 | #### Setup TFT Screen Drivers 163 | ############################### 164 | 165 | #curl https://get.pimoroni.com/hyperpixel4 | bash 166 | echo "" 167 | 168 | ######################################### 169 | #### So Long And Thanks For All The Fish! 170 | ######################################### 171 | printf -- '\n'; 172 | exit 0; 173 | -------------------------------------------------------------------------------- /dczia_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #################################################### 4 | ## 5 | ## ___ ___ _____ 6 | ## | \ / __|_ (_)__ _ 7 | ## | |) | (__ / /| / _` | 8 | ## |___/ \___/___|_\__,_| 9 | ## 10 | ## DCZia 2020 PiBadge Mini Build Scrip 11 | ## 12 | ## Script by @lithochasm & @toasty 13 | ## Shoutout to the DCZia Crew 14 | ## 15 | ## 16 | #################################################### 17 | 18 | 19 | ############################### 20 | #### Get Command Line Options 21 | ############################### 22 | while getopts "dhD:" opt; do 23 | case $opt in 24 | D) 25 | echo "-D was triggered, Parameter: $OPTARG" >&2 26 | DISPVAR="${OPTARG}" 27 | ;; 28 | d) # debug 29 | shopt -o -s xtrace 30 | ;; 31 | \?) 32 | echo "Invalid option: -$OPTARG" >&2 33 | exit 1 34 | ;; 35 | :) 36 | echo "Option -$OPTARG requires an argument. Please specify display type" >&2 37 | exit 1 38 | ;; 39 | h) 40 | echo "Halp: -D DISPLAY_VAR " >&2 41 | echo "Currently supported: " >&2 42 | echo " WAVESHARE - Waveshare 1.44 ST7735S (default)" >&2 43 | echo " WAVESHARE13 - Waveshare 1.4 ST7789VW" >&2 44 | echo " HX8357D - Adafruit PiTFT 3.5" >&2 45 | echo " ILI9341 - Adafruit 2.8 TFT" >&2 46 | exit 1 47 | ;; 48 | esac 49 | done 50 | 51 | # default case if no options 52 | if (( OPTIND == 1 )); then 53 | echo "Default option" 54 | DISPVAR="WAVESHARE" 55 | fi 56 | 57 | ############################### 58 | #### Setup 59 | ############################### 60 | red=$'\e[1;31m' 61 | grn=$'\e[1;32m' 62 | blu=$'\e[1;34m' 63 | # mag=$'\e[1;35m' 64 | # cyn=$'\e[1;36m' 65 | white=$'\e[0m' 66 | 67 | 68 | clear 69 | echo " $blu" 70 | echo " ___ ___ _____" 71 | echo " | \\ / __|_ (_)__ _" 72 | echo " | |) | (__ / /| / _\` | " 73 | echo " |___/ \\___/___|_\\__,_| " 74 | echo " $red DCzia Badge Setup v2 $white" 75 | echo "" 76 | 77 | ############################### 78 | #### Check if we have internet 79 | ############################### 80 | ping -q -w 1 -c 1 "$(ip r | grep default | cut -d ' ' -f 3)" > /dev/null && echo "$grn Net Connection Detected! $white" || echo "$red Error Cannont Connect to Net T_T $white" 81 | 82 | 83 | ############################### 84 | #### Install base packages 85 | ############################### 86 | echo "$grn Installing Software $white" 87 | echo "" 88 | 89 | sudo apt-get -y update 90 | #sudo apt-get upgrade 91 | sudo apt-get -y install omxplayer cmake vim git git-lfs chocolate-doom 92 | wget --no-check-certificate http://www.doomworld.com/3ddownloads/ports/shareware_doom_iwad.zip 93 | unzip shareware_doom_iwad.zip 94 | git clone https://github.com/juj/fbcp-ili9341.git 95 | #git lfs fetch 96 | wget https://dczia.s3-us-west-2.amazonaws.com/dczia2020.m4v 97 | mv dczia2020.m4v videos 98 | wget https://dczia.s3-us-west-2.amazonaws.com/L00t.7z 99 | mv L00t.7z extras 100 | echo "" 101 | 102 | ############################### 103 | #### Setup TFT Screen Drivers 104 | ############################### 105 | ### NEED TO CHECK CMD LINE OPTION AND FORK HERE FOR EACH SCREEN TYPE 106 | ### Adafruit PiTFT 3.5 107 | 108 | cd fbcp-ili9341 || exit 109 | mkdir build 110 | cd build || exit 111 | if [[ "${DISPVAR}" == "HX8357D" ]] ; then 112 | DISPTYPE="-DADAFRUIT_HX8357D_PITFT=ON" 113 | echo "$red Installing fbcp-ili9341 Driver for PiTFT 3.5$white" 114 | cmake "${DISPTYPE}" -DDISPLAY_ROTATE_180_DEGREES=ON -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=6 .. 115 | elif [[ "${DISPVAR}" == "ILI9341" ]] ; then 116 | DISPTYPE="-DADAFRUIT_ILI9341_PITFT=ON" 117 | echo "$red Installing fbcp-ili9341 Driver for Adafruit 2.8$white" 118 | cmake "${DISPTYPE}" -DDISPLAY_ROTATE_180_DEGREES=ON -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=6 .. 119 | elif [[ "${DISPVAR}" == "WAVESHARE13" ]] ; then 120 | DISPTYPE="-DWAVESHARE_ST7789VW_HAT=ON" 121 | echo "$red Installing fbcp-ili9341 Driver for Waveshare 1.3$white" 122 | cmake "${DISPTYPE}" -DDISPLAY_ROTATE_180_DEGREES=OFF -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=14 -DDISPLAY_CROPPED_INSTEAD_OF_SCALING=OFF -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON .. 123 | elif [[ "${DISPVAR}" == "WAVESHARE" ]] ; then 124 | DISPTYPE="-DWAVESHARE_ST7735S_HAT=ON" 125 | echo "$red Installing fbcp-ili9341 Driver for Waveshare 1.44$white" 126 | cmake "${DISPTYPE}" -DDISPLAY_ROTATE_180_DEGREES=OFF -DSTATISTICS=0 -DSPI_BUS_CLOCK_DIVISOR=14 -DDISPLAY_CROPPED_INSTEAD_OF_SCALING=OFF -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON .. 127 | fi 128 | make -j 129 | echo "" 130 | 131 | ############################### 132 | #### System Setup Stuff 133 | ############################### 134 | echo "$grn Checking /etc/rc.local $white" 135 | if ! grep -q fbcp-ili9341 /etc/rc.local; then 136 | echo "$red Updating rc.local - Enabling fbcp-ili9341 $white" 137 | sudo sed -i 's/exit 0//g' /etc/rc.local 138 | sudo sed -i -e '$asudo /home/pi/Defcon28-Badge/fbcp-ili9341/build/fbcp-ili9341 &' /etc/rc.local 139 | 140 | else 141 | echo "$blu fbcp-ili9341 driver already enabled $white" 142 | fi 143 | 144 | if ! grep -q autoplay /etc/rc.local; then 145 | echo "$red Updating rc.local - Enabling Autoplay $white" 146 | sudo sed -i -e '$a sudo /home/pi/Defcon28-Badge/autoplay.sh DCZIA' /etc/rc.local 147 | sudo sed -i -e '$a exit 0' /etc/rc.local 148 | else 149 | echo "$blu Autoplay already enabled $white" 150 | fi 151 | echo "" 152 | 153 | echo "$grn Checking for DCZia Boot Settings $white" 154 | if ! grep -q "DCZia_Hackz" /boot/config.txt; then 155 | echo "$red Updating /boot/config.txt - Enabling Speed Hacks $white" 156 | cat /home/pi/Defcon28-Badge/boot_hacks | sudo tee -a /boot/config.txt > /dev/null 157 | #sudo systemctl disable triggerhappy.service 158 | sudo systemctl disable dphys-swapfile.service 159 | sudo systemctl disable keyboard-setup.service 160 | sudo systemctl disable apt-daily.service 161 | sudo systemctl disable wifi-country.service 162 | sudo systemctl disable hciuart.service 163 | sudo systemctl disable raspi-config.service 164 | sudo systemctl disable avahi-daemon.service 165 | sudo systemctl disable rsyslog.service 166 | else 167 | echo "$blu DCZIa Speed Hacks Enabled $white" 168 | fi 169 | 170 | if ! grep -q "quiet" /boot/cmdline.txt; then 171 | 172 | echo "$red Setting up console $white" 173 | sudo sed -i -e '/console/ s/$/ quiet loglevel=3 console=tty3/' /boot/cmdline.txt 174 | fi 175 | 176 | echo "" 177 | 178 | ######################################### 179 | #### Sets new hostname 180 | host_name=pibadgemini 181 | sudo echo $host_name | sudo tee /etc/hostname 182 | sudo sed -i -E 's/^127.0.1.1.*/127.0.1.1\t'"$host_name"'/' /etc/hosts 183 | #hostnamectl set-hostname $host_name 184 | 185 | ######################################### 186 | #### Change Password 187 | echo -e "raspberry\ndczia2020\ndczia2020" | passwd pi 188 | 189 | ######################################### 190 | #### So Long And Thanks For All The Fish! 191 | printf -- '\n'; 192 | exit 0; 193 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEFCON28-Badge 2 | DCZia 2020 Defcon 28 Badge - PiBadge Mini 3 | 4 | ``` 5 | ____ _ ____ _ __ __ _ _ 6 | | _ \(_) __ ) __ _ __| | __ _ ___| \/ (_)_ __ (_) 7 | | |_) | | _ \ / _` |/ _` |/ _` |/ _ \ |\/| | | '_ \| | 8 | | __/| | |_) | (_| | (_| | (_| | __/ | | | | | | | | 9 | |_| |_|____/ \__,_|\__,_|\__, |\___|_| |_|_|_| |_|_| 10 | |___/ 11 | ``` 12 | 13 | ## Description 14 | This year was crazy, so our origianl plan never happened. Howerever we wanted to do something so that people could have a badge for this year. Our idea was to have an open source design that you can buy parts online and put together at home. We did this with our first badge, and decided to revisit it now just in a smaller package! Think of it as a mini badge, or a small desk toy. 15 | 16 | DCZia would like to present the PiBadge Mini: A Raspberry Pi Zero W with a Waveshare 1.44" LCD Display. We wrote a custom image for the Pi that will auto play some open source and in house made videos. 17 | 18 | ### Build Guide Almost Done -- Check back Saturday 8/1 19 | 20 | ## Build Guide 21 | 22 | Coming soon, but here is the rough guide: 23 | 24 | * Gather parts listed in the [Hardware Overview](#hardware-overview). 25 | * Get your pi and screen, and put them together. If your pi does not have headers already attached, solder them on now. 26 | * Install the screen. Be gentle when putting the screen on, gently press on the sides of the boards to attach it. Avoid pressing down on the screen as it is delicate. 27 | * Burn the official DCZia Raspbian image to your SD card using something like balenaEtcher or another SD card imaging tool. (dd, etc...) 28 | * Optionally if you want to build your own image read about how to use our [Build Script](#build-script) 29 | * Power on your pi with a usb power adapter. 30 | * Profit ? 31 | 32 | ## Hardware Overview 33 | 34 | The general hardware used for this is: 35 | - Raspberry Pi Zero W 36 | - Waveshare 1.44" Pi Zero LCD Screen 37 | - SD Card - Speed Class 10 / U1 highly recommended 38 | 39 | Optional unsupported hardware, but likely to work: 40 | - Any Pi 41 | - Any screen supported by https://github.com/juj/fbcp-ili9341 42 | 43 | Cheap mode (aka i already have a pi but dont want to buy a screen) 44 | - Any Pi 45 | - Plug HDMI from the Pi into your TV. Presto, giant DCZia badge / screensaver / whatever 46 | 47 | ### Mini Pi Badge Official Hardware - Ordering Suggestions 48 | 49 | * WaveShare 1.44" LCD Screen 128x128 Resolution 50 | * [Amazon Link](https://www.amazon.com/waveshare-1-44inch-Interface-Direct-pluggable-Raspberry/dp/B077Z7DWW1/ref=sr_1_3?dchild=1&keywords=waveshare%2B1.44&qid=1595712958&sr=8-3&th=1) 51 | * [Waveshare 1.44inch LCD HAT Wiki Page](https://www.waveshare.com/wiki/1.44inch_LCD_HAT) - Documentation 52 | * [Waveshare 1.44inch LCD HAT Product Page](https://www.waveshare.com/1.44inch-lcd-hat.htm) - Button mappings to Raspberry Pi pins are on this page. 53 | 54 | * Raspberry Pi Zero w/header presoldered 55 | * [Amazon Link](https://www.amazon.com/gp/product/B07W3GJTM1/ref=ox_sc_act_title_1?smid=A3B0XDFTVR980O&psc=1) 56 | 57 | * Or if you can solder 58 | * Pi Zero W kit with accessories 59 | * [Amazon Link](https://www.amazon.com/dp/B0748MPQT4?psc=1&pf_rd_p=0dd39e5f-9b69-4a93-972dfe359b592bc4&pf_rd_r=PXD8W6JGQPPXJ9604N51&pd_rd_wg=B8nLy&pd_rd_i=B0748MPQT4&pd_rd_w=Bfyr1&pd_rd_r=f901f48a-ab0e-4285-bbe7-2b7a721e479a&ref_=pd_luc_rh_crh_rh_sim_01_01_t_img_lh) 60 | 61 | * SD card 8GB minimun 62 | * [Amazon Link](https://www.amazon.com/Sandisk-Ultra-Micro-UHS-I-Adapter/dp/B073K14CVB/ref=sr_1_3?dchild=1&keywords=micro+sd+8&qid=1595713435&s=electronics&sr=1-3) 63 | 64 | ## Software Setup Guide 65 | 66 | ### Official DCZia Raspbian / Debian Buster Image 67 | * Download the image and burn it using balenaEtcher or similar tool such as dd. 68 | * https://dczia.s3-us-west-2.amazonaws.com/dczia2020.img.zip 69 | 70 | ### Build Script 71 | 72 | * Download Raspbian Buster Lite (https://downloads.raspberrypi.org/raspios_lite_armhf_latest) 73 | * Burn it to an sd card (using balenaEtcher, dd, etc...) 74 | * [enable networking](#wifi-setup) 75 | * Boot it, login with the default raspbian user: pi password: raspberry 76 | * Change your password with passwd 77 | * Install git: sudo apt-get install git 78 | * Clone our git repo: git clone https://github.com/dczia/Defcon28-Badge.git 79 | * Run the dczia_setup.sh script inside our repo 80 | * Reboot and you should be good! Screen will be white while booting. 81 | * New hostname will be: pibadgemini 82 | * Log in with User: pi Pass: dczia2020 83 | 84 | Currently it supports our PiBadge 1/2 screen the Adafruti PiTFT 3.5", and the WaveShare 1.44" LCD. Shoudl work on a Pi Zero, Pi Zero W, Pi A, and Pi B. 85 | 86 | ## Alternative Options 87 | 88 | ### Bring your own pi or fbcp-ili9341 display 89 | If you have any pi with a base Raspbian Buster image you should be able to run our setup script to build the badge environment. You will likely need to tune the fbcp-ili9341 build options for your screen. 90 | 91 | Also if you have any PiScreen you should also be able to install the native drivers for your screen and then remove the fbcp-ili9341 driver section from the script to get up and running, but this is unsupported and other drivers may have performance issues. 92 | 93 | ### PiBadge XL 94 | 95 | What? I thought this year you were doing mini?! I know,.. I know... but if you want to go big we also present the PiBadge XL. Go buy a Hyperpixel 4" screen here: 96 | https://www.pishop.us/product/non-touch-hyperpixel-4-0-hi-res-display-for-raspberry-pi/ 97 | 98 | Pi Shop also carries the Pi Zero W with and without headers: https://www.pishop.us/product/raspberry-pi-zero-w/ 99 | 100 | Hyperpixel Cases: https://www.thingiverse.com/search?q=Hyperpixel&type=things&sort=relevant&page=2 101 | 102 | Manual Install: 103 | * Install base raspbian 104 | * Install hyperpixel drivers: curl https://get.pimoroni.com/hyperpixel4 | bash 105 | * Set rotation after drivers are installed and before reboot: hyperpixel-rotate right 106 | * Reboot 107 | * Clone the repo 108 | * Run the hyperpixel_setup.sh scrip to pull down the videos and install software. 109 | * Reboot! 110 | 111 | ### Cases 112 | See the cases folder. Syntax remixed a case design to allow your badge to be protected with an optional lid. babdor also made a Zia shaped desk stand for your PiBadge. 113 | 114 | ## Troubleshooting 115 | * For now you need to clone the repo into the pi users home directory as paths are hardcoded. I know, i know... 116 | * If you see the worlds tiniest console on your pi you are likely missing the video. Check if dczia2020.m4v is in the videos folder. 117 | * If your screen stays white check that fbcp-ili9341 is running, this is the LCD driver. (ps -ef | grep fbcp) 118 | * If it is running and your screen is still white, check your soldering if you soldered on the headers. 119 | 120 | 121 | ### WiFi Setup 122 | If you want to configure your pi to have network access there are two way to do it: 123 | 124 | *If you do not have a keyboard & monitor* 125 | Mount your /boot partition on the SDCard and add a file called wpa_supplicant.conf 126 | 127 | Add the following information: 128 | ``` 129 | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev 130 | update_config=1 131 | country=US 132 | 133 | network={ 134 | ssid="" 135 | psk="" 136 | } 137 | ``` 138 | Finally add an empty file called SSH to the /boot folder to enable SSH. 139 | 140 | More info at: https://www.raspberrypi.org/documentation/configuration/wireless/headless.md 141 | 142 | *If you have a keyboard and monitor* 143 | 144 | Log into your Pi using the default Raspbian username and password then use the tool raspi-config to setup WiFi and enable SSH. 145 | 146 | Alternativly you can use the commandline to setup your wireless network. 147 | 148 | Open the wpa-supplicant config file in nano or vi: 149 | 150 | sudo nano /etc/wpa_supplicant/wpa_supplicant.conf 151 | 152 | Add the following lines to the bottom: 153 | ``` 154 | network={ 155 | ssid="your network" 156 | psk="your password" 157 | } 158 | ``` 159 | NOTE: for added security (who doesn’t appreciate that?), omit the quotes and input your password as a 32 byte hexadecimal! 160 | 161 | Save the file by pressing Ctrl+x, then y, then Enter 162 | 163 | If it doesn’t work, check your inputs 164 | 165 | More config deets available at https://www.raspberrypi.org/documentation/configuration/wireless 166 | -------------------------------------------------------------------------------- /extras/a2Te0n2VB.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | DCZiaDefconGreen Chile ✖ Solder28 --------------------------------------------------------------------------------