From 3dfb1d75fbe6b61a1d4f00b62b70f8622bd98a99 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Wed, 15 Jul 2026 19:27:29 -0400 Subject: [PATCH 1/5] BSidesPGH foxes --- .../src/conferences/2026BSidesPGH.h | 15 ++ .../iBeacon/src/conferences/2026BSidesPGH.h | 31 ++++ .../src/conferences/2026BSidesPGH.h | 134 ++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 bluetooth/classic_discoverable/src/conferences/2026BSidesPGH.h create mode 100644 bluetooth/iBeacon/src/conferences/2026BSidesPGH.h create mode 100644 wifi/wifi_ap_client/src/conferences/2026BSidesPGH.h diff --git a/bluetooth/classic_discoverable/src/conferences/2026BSidesPGH.h b/bluetooth/classic_discoverable/src/conferences/2026BSidesPGH.h new file mode 100644 index 0000000..58b1fa6 --- /dev/null +++ b/bluetooth/classic_discoverable/src/conferences/2026BSidesPGH.h @@ -0,0 +1,15 @@ +#if defined(EASY) +#define RFHS_CHALLENGE_NAME "Bluetooth Classic Easy Fox" +#define NAME "Chase BTC Easy Fox" +#define MAC_ADDR {0xF2, 0x6B, 0x8C, 0x10, 0xEE, 0xBC} +#define TIME_TO_WAKE 300 +#define TIME_TO_SLEEP 0 +#endif + +#if defined(HARD) +#define RFHS_CHALLENGE_NAME "Bluetooth Classic Hard Fox" +#define NAME "Marshall BTC Hard Fox" +#define MAC_ADDR {0xF2, 0xC1, 0xD8, 0xA9, 0x7E, 0x0F} +#define TIME_TO_WAKE 30 +#define TIME_TO_SLEEP 30 +#endif diff --git a/bluetooth/iBeacon/src/conferences/2026BSidesPGH.h b/bluetooth/iBeacon/src/conferences/2026BSidesPGH.h new file mode 100644 index 0000000..f97a528 --- /dev/null +++ b/bluetooth/iBeacon/src/conferences/2026BSidesPGH.h @@ -0,0 +1,31 @@ +#if defined(EASY) +#define RFHS_CHALLENGE_NAME "BLE Easy Fox" +#define DEVICE_NAME "Skye BLE Easy Fox" +#define BEACON_UUID "F4162470-E0C1-42FD-B2CA-3FF8FA2B6CA9" +#define MANUFACTURER_ID 0x4c00 +#define MAJOR 5 +#define MINOR 88 +#define SIGNAL_POWER 0xc5 +#define MAC_ADDR {0xF2, 0xC4, 0xBD, 0x76, 0x16, 0xB3} + +#elif defined(MEDIUM) +#define RFHS_CHALLENGE_NAME "BLE Medium Fox" +#define DEVICE_NAME "Rocky BLE Medium Fox" +#define BEACON_UUID "A57D0F5F-BBF4-4EEB-ABFA-5D0A64601482" +#define MANUFACTURER_ID 0x4c00 +#define MAJOR 5 +#define MINOR 88 +#define SIGNAL_POWER 0xc5 +#define MAC_ADDR {0xF2, 0x64, 0xA0, 0x14, 0xCB, 0x52} + +#elif defined(HARD) +#define RFHS_CHALLENGE_NAME "BLE Hard Fox" +#define DEVICE_NAME "Rubble BLE Hard Fox" +#define BEACON_UUID "689236A5-DC8A-4C2A-93C5-E877710C5013" +#define MANUFACTURER_ID 0x4c00 +#define MAJOR 5 +#define MINOR 88 +#define SIGNAL_POWER 0xc5 +#define MAC_ADDR {0xF2, 0xF8, 0x20, 0xA7, 0x78, 0xA5} + +#endif diff --git a/wifi/wifi_ap_client/src/conferences/2026BSidesPGH.h b/wifi/wifi_ap_client/src/conferences/2026BSidesPGH.h new file mode 100644 index 0000000..d2fb279 --- /dev/null +++ b/wifi/wifi_ap_client/src/conferences/2026BSidesPGH.h @@ -0,0 +1,134 @@ +// Bash to generate MAC address +// Note: least significant bit of first byte must be zero, here it's fixed to 0xF2 +// printf '0xF2, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X\n' $[RANDOM%256] $[RANDOM%256] $[RANDOM%256] $[RANDOM%256] $[RANDOM%256] + +//WIFI_POWER_19_5dBm 78 +//WIFI_POWER_19dBm 76 +//WIFI_POWER_18_5dBm 74 +//WIFI_POWER_17dBm 68 +//WIFI_POWER_15dBm 60 +//WIFI_POWER_13dBm 52 +//WIFI_POWER_11dBm 44 +//WIFI_POWER_8_5dBm 34 +//WIFI_POWER_7dBm 28 +//WIFI_POWER_5dBm 20 +//WIFI_POWER_2dBm 8 +//WIFI_POWER_MINUS_1dBm -4 + +#if defined(AP) +#if defined(EASY) +#define RFHS_CHALLENGE_NAME "WiFi AP Easy Fox" +// Network config +#define FSSID "Zuma WiFi AP Easy Fox" +#define PSK "0123456789" +// set mac address +#define MAC_ADDR {0xF2, 0x86, 0x9C, 0x93, 0x37, 0x38} +// 1-13 permitted 0 means random +#define CHANNEL 1 +// 0 broadcast 1 hidden +#define SSID_HIDDEN 0 +// 1-4 permitted +#define MAX_CLIENTS 1 +#define TIME_TO_WAKE 15 +#define TIME_TO_SLEEP 5 +// checks run during startup so we want to stay +// running no longer than a few minutes to force +// checks to run and led to update +#define TXPOWER WIFI_POWER_17dBm +#endif + +#if defined(HARD) +#define RFHS_CHALLENGE_NAME "WiFi AP Hard Fox" +// Network config +#define FSSID "Everest WiFi AP Hard Fox" +#define PSK "0123456789" +// set mac address +#define MAC_ADDR {0xF2, 0xCA, 0xCF, 0x0A, 0x6B, 0x4C} +// 1-13 permitted 0 means random +#define CHANNEL 0 +// 0 broadcast 1 hidden +#define SSID_HIDDEN 0 +// 1-4 permitted +#define MAX_CLIENTS 1 +// checks run during startup so we want to stay +// running no longer than a few minutes to force +// checks to run and led to update +#define TIME_TO_WAKE 30 +#define TIME_TO_SLEEP 45 +#define TXPOWER WIFI_POWER_7dBm +#endif + +#if defined(FIVEEASY) +#define RFHS_CHALLENGE_NAME "WiFi 5GHz AP Easy Fox" +// Network config +#define FSSID "Rex WiFi 5GHz AP Easy Fox" +#define PSK "0123456789" +// set mac address +#define MAC_ADDR {0xF2, 0x8B, 0x0A, 0x96, 0x8A, 0xA8} +// 1-13 permitted 0 means random +#define CHANNEL 36 +// 0 broadcast 1 hidden +#define SSID_HIDDEN 0 +// 1-4 permitted +#define MAX_CLIENTS 1 +#define TIME_TO_WAKE 15 +#define TIME_TO_SLEEP 5 +// checks run during startup so we want to stay +// running no longer than a few minutes to force +// checks to run and led to update +#define TXPOWER WIFI_POWER_17dBm +#endif + +#if defined(FIVEHARD) +#define RFHS_CHALLENGE_NAME "WiFi 5GHz AP Hard Fox" +// Network config +#define FSSID "Liberty WiFi 5GHz AP Hard Fox" +#define PSK "0123456789" +// set mac address +#define MAC_ADDR {0xF2, 0xB4, 0x21, 0x54, 0x87, 0x8E} +// 1-13 permitted 0 means random +#define CHANNEL 0 +// 0 broadcast 1 hidden +#define SSID_HIDDEN 0 +// 1-4 permitted +#define MAX_CLIENTS 1 +// checks run during startup so we want to stay +// running no longer than a few minutes to force +// checks to run and led to update +#define TIME_TO_WAKE 30 +#define TIME_TO_SLEEP 45 +#define TXPOWER WIFI_POWER_7dBm +#endif +#endif + +#if defined(CLIENT) +#if defined(EASY) +#define RFHS_CHALLENGE_NAME "WiFi Client Easy Fox" +// set mac address +#define FSSID "Tracker WiFi Client Easy Fox" +#define PSK "0123456789" +#define MAC_ADDR {0xF2, 0x76, 0x99, 0x05, 0x5A, 0x0C} +// Network config +// checks run during startup so we want to stay +// running no longer than a few minutes to force +// checks to run and led to update +#define TIME_TO_WAKE 300 +#define TIME_TO_SLEEP 1 +#define TXPOWER WIFI_POWER_17dBm +#endif + +#if defined(HARD) +#define RFHS_CHALLENGE_NAME "WiFi Client Hard Fox" +// Network config +#define FSSID "Robo-Dog WiFi Client Hard Fox" +#define PSK "0123456789" +// set mac address +#define MAC_ADDR {0xF2, 0xFD, 0xAD, 0x2B, 0x9F, 0xDE} +// checks run during startup so we want to stay +// running no longer than a few minutes to force +// checks to run and led to update +#define TIME_TO_WAKE 300 +#define TIME_TO_SLEEP 0 +#define TXPOWER WIFI_POWER_17dBm +#endif +#endif From 501c861f197707fb2a824b00d356da88c9d58860 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Wed, 15 Jul 2026 20:46:27 -0400 Subject: [PATCH 2/5] Update names for new season, and add instructions --- .../src/conferences/9999skel.h | 6 ++++-- bluetooth/iBeacon/src/conferences/9999skel.h | 9 ++++++--- foxhunt_instructions.txt | 14 ++++++++++++++ make_conference_full.sh | 11 +++++++---- wifi/wifi_ap_client/src/conferences/9999skel.h | 18 ++++++++++++------ 5 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 foxhunt_instructions.txt diff --git a/bluetooth/classic_discoverable/src/conferences/9999skel.h b/bluetooth/classic_discoverable/src/conferences/9999skel.h index 9166ef0..4c4831f 100644 --- a/bluetooth/classic_discoverable/src/conferences/9999skel.h +++ b/bluetooth/classic_discoverable/src/conferences/9999skel.h @@ -1,6 +1,7 @@ #if defined(EASY) #define RFHS_CHALLENGE_NAME "Bluetooth Classic Easy Fox" -#define NAME "Chase BTC Easy Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the Bluetooth Classic Easy Fox?'" +#define NAME "Molly BTC Easy Fox" #define MAC_ADDR {0x00, 0x01, 0x02, 0x03, 0x04, 0x05} #define TIME_TO_WAKE 300 #define TIME_TO_SLEEP 0 @@ -8,7 +9,8 @@ #if defined(HARD) #define RFHS_CHALLENGE_NAME "Bluetooth Classic Hard Fox" -#define NAME "Marshall BTC Hard Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the Bluetooth Classic Hard Fox?'" +#define NAME "Case BTC Hard Fox" #define MAC_ADDR {0x00, 0x06, 0x07, 0x08, 0x09, 0x0a} #define TIME_TO_WAKE 30 #define TIME_TO_SLEEP 30 diff --git a/bluetooth/iBeacon/src/conferences/9999skel.h b/bluetooth/iBeacon/src/conferences/9999skel.h index 0fc7da6..3eee46b 100644 --- a/bluetooth/iBeacon/src/conferences/9999skel.h +++ b/bluetooth/iBeacon/src/conferences/9999skel.h @@ -1,6 +1,7 @@ #if defined(EASY) #define RFHS_CHALLENGE_NAME "BLE Easy Fox" -#define DEVICE_NAME "Skye BLE Easy Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the BLE Easy Fox?'" +#define DEVICE_NAME "Bruce BLE Easy Fox" #define BEACON_UUID "00000001-0002-0003-0004-000000000005" #define MANUFACTURER_ID 0x4c00 #define MAJOR 5 @@ -10,7 +11,8 @@ #elif defined(MEDIUM) #define RFHS_CHALLENGE_NAME "BLE Medium Fox" -#define DEVICE_NAME "Rocky BLE Medium Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the BLE Medium Fox?'" +#define DEVICE_NAME "Cath BLE Medium Fox" #define BEACON_UUID "00000006-0007-0008-0009-00000000000a" #define MANUFACTURER_ID 0x4c00 #define MAJOR 5 @@ -20,7 +22,8 @@ #elif defined(HARD) #define RFHS_CHALLENGE_NAME "BLE Hard Fox" -#define DEVICE_NAME "Rubble BLE Hard Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the BLE Hard Fox?'" +#define DEVICE_NAME "3Jane BLE Hard Fox" #define BEACON_UUID "0000000b-000c-000d-000e-00000000000f" #define MANUFACTURER_ID 0x4c00 #define MAJOR 5 diff --git a/foxhunt_instructions.txt b/foxhunt_instructions.txt new file mode 100644 index 0000000..7c3d871 --- /dev/null +++ b/foxhunt_instructions.txt @@ -0,0 +1,14 @@ +Fox Instructions +---------------- +Take the "I was the fox" patch, it is yours for agreeing to be our fox. +Keep the Fox powered on and in the kit as you recieved it. +For most of the foxes all steady leds means working correctly. +Rapid blinking or alternating color is bad, contact your fox handler. +When a hunter says the keyphrase in FOX_KEYWORDS, give them the whole kit. + +Fox Hunter Instructions +----------------------- +The challenge name on the scoreboard is in the RFHS_CHALLENGE_NAME field. +The flag for the scoreboard is in the Flag field. +Keep the patch that says "I found the fox". +Return the remainder of the fox kit to the RF CTF desk. diff --git a/make_conference_full.sh b/make_conference_full.sh index 4c0e887..cebdea9 100755 --- a/make_conference_full.sh +++ b/make_conference_full.sh @@ -42,16 +42,19 @@ for challenge in bluetooth/iBeacon bluetooth/classic_discoverable wifi/wifi_ap_c exit 1 fi ln -snf "conferences/$(date +"%Y")${1}.h" src/current_conf.h - grep -e 'RFHS_CHALLENGE_NAME\|NAME\|UUID\|MAC_ADDR\|FSSID\|CHANNEL' "src/conferences/$(date +"%Y")${1}.h" | sed -e 's#{##' -e 's#}##' -e 's#0x##g' -e 's#, #:#g' | tee -a "${OLDPWD}/$(date +"%Y")${1}.txt" > /dev/null 2>&1 + grep -e 'RFHS_CHALLENGE_NAME\|FOX_KEYWORDS\|NAME\|UUID\|MAC_ADDR\|FSSID\|CHANNEL' "src/conferences/$(date +"%Y")${1}.h" | sed -e 's#{##' -e 's#}##' -e 's#0x##g' -e 's#, #:#g' | tee -a "${OLDPWD}/$(date +"%Y")${1}.txt" > /dev/null 2>&1 printf "complete\n" popd > /dev/null 2>&1 done printf "Seeding keys for %s%s... " "$(date +"%Y")" "${1}" -#sed -i \ -# -e "/RFHS_CHALLENGE_NAME/i -\n----------------------------------------------------------------\n$(date +"%Y")${1}\n$(threewords)\n" \ -# "$(date +"%Y")${1}.txt" sed -i \ -e "/RFHS_CHALLENGE_NAME/{h; s/.*/printf -- '-\\n----------------------------------------------------------------\\nConference: %s%s\\nFlag: %s\\n\\n' \"\$(date +%Y)\" \"${1}\" \"\$(threewords)\"/e; G;}" \ "$(date +"%Y")${1}.txt" +printf "complete\n" +printf "Adding instructions..." +sed -i -e "/FOX_KEYWORDS/{h; s/.*/printf -- '%s\n\n' \"\$(cat foxhunt_instructions.txt)\"/e; G;}" \ + "$(date +"%Y")${1}.txt" sed -i '1iSet font to "Roboto Mono' "$(date +"%Y")${1}.txt" printf "complete\n" + +printf "Generation Complete\n" diff --git a/wifi/wifi_ap_client/src/conferences/9999skel.h b/wifi/wifi_ap_client/src/conferences/9999skel.h index 903c1ac..6fdaebb 100644 --- a/wifi/wifi_ap_client/src/conferences/9999skel.h +++ b/wifi/wifi_ap_client/src/conferences/9999skel.h @@ -18,8 +18,9 @@ #if defined(AP) #if defined(EASY) #define RFHS_CHALLENGE_NAME "WiFi AP Easy Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi AP Easy Fox?'" // Network config -#define FSSID "Zuma WiFi AP Easy Fox" +#define FSSID "Hiro WiFi AP Easy Fox" #define PSK "0123456789" // set mac address #define MAC_ADDR {0x00, 0x01, 0x02, 0x03, 0x04, 0x05} @@ -39,8 +40,9 @@ #if defined(HARD) #define RFHS_CHALLENGE_NAME "WiFi AP Hard Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi AP Hard Fox?'" // Network config -#define FSSID "Everest WiFi AP Hard Fox" +#define FSSID "YT WiFi AP Hard Fox" #define PSK "0123456789" // set mac address #define MAC_ADDR {0x00, 0x06, 0x07, 0x08, 0x09, 0x0a} @@ -60,8 +62,9 @@ #if defined(FIVEEASY) #define RFHS_CHALLENGE_NAME "WiFi 5GHz AP Easy Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi 5GHz AP Easy Fox?'" // Network config -#define FSSID "Rex WiFi 5GHz AP Easy Fox" +#define FSSID "Enzo WiFi 5GHz AP Easy Fox" #define PSK "0123456789" // set mac address #define MAC_ADDR {0x00, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f} @@ -81,8 +84,9 @@ #if defined(FIVEHARD) #define RFHS_CHALLENGE_NAME "WiFi 5GHz AP Hard Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi 5GHz AP Hard Fox?'" // Network config -#define FSSID "Liberty WiFi 5GHz AP Hard Fox" +#define FSSID "Lagos WiFi 5GHz AP Hard Fox" #define PSK "0123456789" // set mac address #define MAC_ADDR {0x00, 0x10, 0x11, 0x12, 0x13, 0x14} @@ -104,8 +108,9 @@ #if defined(CLIENT) #if defined(EASY) #define RFHS_CHALLENGE_NAME "WiFi Client Easy Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi Client Easy Fox?'" // set mac address -#define FSSID "Tracker WiFi Client Easy Fox" +#define FSSID "Ng WiFi Client Easy Fox" #define PSK "0123456789" #define MAC_ADDR {0x00, 0x15, 0x16, 0x17, 0x18, 0x19} // Network config @@ -119,8 +124,9 @@ #if defined(HARD) #define RFHS_CHALLENGE_NAME "WiFi Client Hard Fox" +#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi Client Hard Fox?'" // Network config -#define FSSID "Robo-Dog WiFi Client Hard Fox" +#define FSSID "Mr Lee WiFi Client Hard Fox" #define PSK "0123456789" // set mac address #define MAC_ADDR {0x00, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e} From e07dea9fd5524a9543de8e4dfdd78a8695c37fce Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Thu, 16 Jul 2026 09:39:08 -0400 Subject: [PATCH 3/5] fix minor typo --- make_conference_full.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make_conference_full.sh b/make_conference_full.sh index cebdea9..a44a9e7 100755 --- a/make_conference_full.sh +++ b/make_conference_full.sh @@ -54,7 +54,7 @@ printf "complete\n" printf "Adding instructions..." sed -i -e "/FOX_KEYWORDS/{h; s/.*/printf -- '%s\n\n' \"\$(cat foxhunt_instructions.txt)\"/e; G;}" \ "$(date +"%Y")${1}.txt" -sed -i '1iSet font to "Roboto Mono' "$(date +"%Y")${1}.txt" +sed -i '1iSet font to "Roboto Mono"' "$(date +"%Y")${1}.txt" printf "complete\n" printf "Generation Complete\n" From 2e1b318e5afd4f13a38fb0389eaff08a425ef187 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Thu, 16 Jul 2026 10:00:32 -0400 Subject: [PATCH 4/5] put flag in instructions --- foxhunt_instructions.txt | 2 +- make_conference_full.sh | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/foxhunt_instructions.txt b/foxhunt_instructions.txt index 7c3d871..ca9002d 100644 --- a/foxhunt_instructions.txt +++ b/foxhunt_instructions.txt @@ -9,6 +9,6 @@ When a hunter says the keyphrase in FOX_KEYWORDS, give them the whole kit. Fox Hunter Instructions ----------------------- The challenge name on the scoreboard is in the RFHS_CHALLENGE_NAME field. -The flag for the scoreboard is in the Flag field. +The flag for the scoreboard is 'FOXFLAG'. Keep the patch that says "I found the fox". Return the remainder of the fox kit to the RF CTF desk. diff --git a/make_conference_full.sh b/make_conference_full.sh index a44a9e7..4b7ef36 100755 --- a/make_conference_full.sh +++ b/make_conference_full.sh @@ -29,7 +29,7 @@ threewords() { exit 1 fi dictionary='/usr/share/dict/cracklib-words' - shuf -n3 "${dictionary}" | tr '[:lower:]' '[:upper:]' | paste -sd ' ' + shuf -n3 "${dictionary}" | tr '[:lower:]' '[:upper:]' | paste -sd ' ' | dos2unix } export -f threewords @@ -46,15 +46,23 @@ for challenge in bluetooth/iBeacon bluetooth/classic_discoverable wifi/wifi_ap_c printf "complete\n" popd > /dev/null 2>&1 done -printf "Seeding keys for %s%s... " "$(date +"%Y")" "${1}" +printf "Formatting with conference name for %s%s... " "$(date +"%Y")" "${1}" sed -i \ - -e "/RFHS_CHALLENGE_NAME/{h; s/.*/printf -- '-\\n----------------------------------------------------------------\\nConference: %s%s\\nFlag: %s\\n\\n' \"\$(date +%Y)\" \"${1}\" \"\$(threewords)\"/e; G;}" \ + -e "/RFHS_CHALLENGE_NAME/{h; s/.*/printf -- '-\\n----------------------------------------------------------------\\nConference: %s%s\\n\\n' \"\$(date +%Y)\" \"${1}\"/e; G;}" \ "$(date +"%Y")${1}.txt" printf "complete\n" + printf "Adding instructions..." -sed -i -e "/FOX_KEYWORDS/{h; s/.*/printf -- '%s\n\n' \"\$(cat foxhunt_instructions.txt)\"/e; G;}" \ +sed -i -e "/FOX_KEYWORDS/{h; s/.*/printf -- '\n%s\n\n' \"\$(cat foxhunt_instructions.txt)\"/e; G;}" \ "$(date +"%Y")${1}.txt" -sed -i '1iSet font to "Roboto Mono"' "$(date +"%Y")${1}.txt" printf "complete\n" +printf "Seeding keys for %s%s... " "$(date +"%Y")" "${1}" +#this works despite shell check thinking it does not +#shellcheck disable=2016 +sed -i -e 's/\(.*\)[F]OXFLAG\(.*\)/printf "%s%s%s\\n" \x22\1\x22 "\$(threewords)" \x22\2\x22/e' "$(date +"%Y")${1}.txt" +printf "complete\n" + +sed -i '1iSet font to "Roboto Mono"' "$(date +"%Y")${1}.txt" + printf "Generation Complete\n" From 5adcea84920beb64004de74db1b437e232085a34 Mon Sep 17 00:00:00 2001 From: "Rick Farina (Zero_Chaos)" Date: Thu, 16 Jul 2026 21:56:09 -0400 Subject: [PATCH 5/5] more cleanup and improved report writing for conference script --- .../src/conferences/9999skel.h | 8 +-- bluetooth/iBeacon/src/conferences/9999skel.h | 12 ++-- make_conference_full.sh | 68 ++++++++++--------- non-kitsune-foxes/README.md | 1 + non-kitsune-foxes/fm_fox/README.md | 1 + non-kitsune-foxes/fm_fox/src/current_conf.h | 2 + .../wifi_ap_client/src/conferences/9999skel.h | 24 +++---- 7 files changed, 62 insertions(+), 54 deletions(-) create mode 100644 non-kitsune-foxes/README.md create mode 100644 non-kitsune-foxes/fm_fox/README.md create mode 100644 non-kitsune-foxes/fm_fox/src/current_conf.h diff --git a/bluetooth/classic_discoverable/src/conferences/9999skel.h b/bluetooth/classic_discoverable/src/conferences/9999skel.h index 4c4831f..68f015a 100644 --- a/bluetooth/classic_discoverable/src/conferences/9999skel.h +++ b/bluetooth/classic_discoverable/src/conferences/9999skel.h @@ -1,6 +1,6 @@ #if defined(EASY) -#define RFHS_CHALLENGE_NAME "Bluetooth Classic Easy Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the Bluetooth Classic Easy Fox?'" +// RFHS_CHALLENGE_NAME "Bluetooth Classic Easy Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the Bluetooth Classic Easy Fox?'" #define NAME "Molly BTC Easy Fox" #define MAC_ADDR {0x00, 0x01, 0x02, 0x03, 0x04, 0x05} #define TIME_TO_WAKE 300 @@ -8,8 +8,8 @@ #endif #if defined(HARD) -#define RFHS_CHALLENGE_NAME "Bluetooth Classic Hard Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the Bluetooth Classic Hard Fox?'" +// RFHS_CHALLENGE_NAME "Bluetooth Classic Hard Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the Bluetooth Classic Hard Fox?'" #define NAME "Case BTC Hard Fox" #define MAC_ADDR {0x00, 0x06, 0x07, 0x08, 0x09, 0x0a} #define TIME_TO_WAKE 30 diff --git a/bluetooth/iBeacon/src/conferences/9999skel.h b/bluetooth/iBeacon/src/conferences/9999skel.h index 3eee46b..687a4d2 100644 --- a/bluetooth/iBeacon/src/conferences/9999skel.h +++ b/bluetooth/iBeacon/src/conferences/9999skel.h @@ -1,6 +1,6 @@ #if defined(EASY) -#define RFHS_CHALLENGE_NAME "BLE Easy Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the BLE Easy Fox?'" +// RFHS_CHALLENGE_NAME "BLE Easy Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the BLE Easy Fox?'" #define DEVICE_NAME "Bruce BLE Easy Fox" #define BEACON_UUID "00000001-0002-0003-0004-000000000005" #define MANUFACTURER_ID 0x4c00 @@ -10,8 +10,8 @@ #define MAC_ADDR {0x00, 0x01, 0x02, 0x03, 0x04, 0x05} #elif defined(MEDIUM) -#define RFHS_CHALLENGE_NAME "BLE Medium Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the BLE Medium Fox?'" +// RFHS_CHALLENGE_NAME "BLE Medium Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the BLE Medium Fox?'" #define DEVICE_NAME "Cath BLE Medium Fox" #define BEACON_UUID "00000006-0007-0008-0009-00000000000a" #define MANUFACTURER_ID 0x4c00 @@ -21,8 +21,8 @@ #define MAC_ADDR {0x00, 0x06, 0x07, 0x08, 0x09, 0x0a} #elif defined(HARD) -#define RFHS_CHALLENGE_NAME "BLE Hard Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the BLE Hard Fox?'" +// RFHS_CHALLENGE_NAME "BLE Hard Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the BLE Hard Fox?'" #define DEVICE_NAME "3Jane BLE Hard Fox" #define BEACON_UUID "0000000b-000c-000d-000e-00000000000f" #define MANUFACTURER_ID 0x4c00 diff --git a/make_conference_full.sh b/make_conference_full.sh index 4b7ef36..8969422 100755 --- a/make_conference_full.sh +++ b/make_conference_full.sh @@ -2,8 +2,21 @@ set -e set -u +threewords() { + if [ ! -r '/usr/share/dict/cracklib-words' ]; then + printf 'Unable to find /usr/share/dict/cracklib-words\n' + exit 1 + fi + dictionary='/usr/share/dict/cracklib-words' + shuf -n3 "${dictionary}" | tr '[:lower:]' '[:upper:]' | paste -sd ' ' | dos2unix +} +export -f threewords + # Ensure we have a conference name -if [ -z "${1:-}" ]; then +if [ -n "${1:-}" ]; then + requested_conf="${1}" + conf="$(date +"%Y")${1}" +else printf "Please provide conference name\n" exit 1 fi @@ -11,58 +24,49 @@ fi # Check if that conference name already exists for challenge in bluetooth/iBeacon bluetooth/classic_discoverable wifi/wifi_ap_client; do pushd "${challenge}" > /dev/null 2>&1 - if [ -e "src/conferences/$(date +"%Y")${1}.h" ]; then - printf "%s/src/conferences/%s%s.h already exists, please remove it or pick a different name\n" "${challenge}" "$(date +"%Y")" "${1}" + if [ -e "src/conferences/${conf}.h" ]; then + printf "%s/src/conferences/%s.h already exists, please remove it or pick a different name\n" "${challenge}" "${conf}" exit 1 fi popd > /dev/null 2>&1 done -if [ -f "$(date +"%Y")${1}.txt" ]; then - printf '%s%s.txt already exists, please remove it or pick a different name\n' "$(date +"%Y")" "${1}" +if [ -f "${conf}.txt" ]; then + printf '%s.txt already exists, please remove it or pick a different name\n' "${conf}" exit 1 fi -# Safety checks complete, define functions and do the thing -threewords() { - if [ ! -r '/usr/share/dict/cracklib-words' ]; then - printf 'Unable to find /usr/share/dict/cracklib-words\n' - exit 1 - fi - dictionary='/usr/share/dict/cracklib-words' - shuf -n3 "${dictionary}" | tr '[:lower:]' '[:upper:]' | paste -sd ' ' | dos2unix -} -export -f threewords - -for challenge in bluetooth/iBeacon bluetooth/classic_discoverable wifi/wifi_ap_client; do +for challenge in bluetooth/iBeacon bluetooth/classic_discoverable wifi/wifi_ap_client non-kitsune-foxes/fm_fox; do pushd "${challenge}" > /dev/null 2>&1 - printf "Rolling %s for %s%s... " "${challenge}" "$(date +"%Y")" "${1}" - ./make_conference.sh "${1}" - if [ ! -e "src/conferences/$(date +"%Y")${1}.h" ]; then - printf "Something went wrong creating %s/src/conferences/%s%s.h, please scroll up\n" "${challenge}" "$(date +"%Y")" "${1}" - exit 1 + printf "Rolling %s for %s... " "${challenge}" "${conf}" + if [ -x make_conference.sh ]; then + ./make_conference.sh "${requested_conf}" + if [ ! -e "src/conferences/${conf}.h" ]; then + printf "Something went wrong creating %s/src/conferences/%s.h, please scroll up\n" "${challenge}" "${conf}" + exit 1 + fi + ln -snf "conferences/${conf}.h" src/current_conf.h fi - ln -snf "conferences/$(date +"%Y")${1}.h" src/current_conf.h - grep -e 'RFHS_CHALLENGE_NAME\|FOX_KEYWORDS\|NAME\|UUID\|MAC_ADDR\|FSSID\|CHANNEL' "src/conferences/$(date +"%Y")${1}.h" | sed -e 's#{##' -e 's#}##' -e 's#0x##g' -e 's#, #:#g' | tee -a "${OLDPWD}/$(date +"%Y")${1}.txt" > /dev/null 2>&1 + grep -e 'RFHS_CHALLENGE_NAME\|FOX_KEYWORDS\|NAME\|UUID\|MAC_ADDR\|FSSID\|CHANNEL' "src/current_conf.h" | \ + sed -e 's#{##' -e 's#}##' -e 's#0x##g' -e 's#, #:#g' -e 's#// ##' -e "s/#define //" | tee -a "${OLDPWD}/${conf}.txt" > /dev/null 2>&1 printf "complete\n" popd > /dev/null 2>&1 done -printf "Formatting with conference name for %s%s... " "$(date +"%Y")" "${1}" +printf "Formatting with conference name for %s... " "${conf}" sed -i \ - -e "/RFHS_CHALLENGE_NAME/{h; s/.*/printf -- '-\\n----------------------------------------------------------------\\nConference: %s%s\\n\\n' \"\$(date +%Y)\" \"${1}\"/e; G;}" \ - "$(date +"%Y")${1}.txt" + -e "/RFHS_CHALLENGE_NAME/{h; s/.*/printf -- '-\\n----------------------------------------------------------------\\nConference: %s\\n' \"${conf}\"/e; G;}" \ + "${conf}.txt" printf "complete\n" printf "Adding instructions..." -sed -i -e "/FOX_KEYWORDS/{h; s/.*/printf -- '\n%s\n\n' \"\$(cat foxhunt_instructions.txt)\"/e; G;}" \ - "$(date +"%Y")${1}.txt" +sed -i -e "/FOX_KEYWORDS/{h; s/.*/printf -- '\n%s\n\n' \"\$(cat foxhunt_instructions.txt)\"/e; G;}" "${conf}.txt" printf "complete\n" -printf "Seeding keys for %s%s... " "$(date +"%Y")" "${1}" +printf "Seeding keys for %s... " "${conf}" #this works despite shell check thinking it does not #shellcheck disable=2016 -sed -i -e 's/\(.*\)[F]OXFLAG\(.*\)/printf "%s%s%s\\n" \x22\1\x22 "\$(threewords)" \x22\2\x22/e' "$(date +"%Y")${1}.txt" +sed -i -e 's/\(.*\)[F]OXFLAG\(.*\)/printf "%s%s%s\\n" \x22\1\x22 "\$(threewords)" \x22\2\x22/e' "${conf}.txt" printf "complete\n" -sed -i '1iSet font to "Roboto Mono"' "$(date +"%Y")${1}.txt" +sed -i '1iSet font to "Roboto Mono"' "${conf}.txt" printf "Generation Complete\n" diff --git a/non-kitsune-foxes/README.md b/non-kitsune-foxes/README.md new file mode 100644 index 0000000..fcafcfe --- /dev/null +++ b/non-kitsune-foxes/README.md @@ -0,0 +1 @@ +This folder is full of pretend stubs so that make_conference.sh will create flags and directions for foxes we use for the RF CTF which are not actually part of kitsune. diff --git a/non-kitsune-foxes/fm_fox/README.md b/non-kitsune-foxes/fm_fox/README.md new file mode 100644 index 0000000..2116bb1 --- /dev/null +++ b/non-kitsune-foxes/fm_fox/README.md @@ -0,0 +1 @@ +This fox is a 12v dc fm transmitter like you can find at any gas station which has been modified to run on 5v. diff --git a/non-kitsune-foxes/fm_fox/src/current_conf.h b/non-kitsune-foxes/fm_fox/src/current_conf.h new file mode 100644 index 0000000..2c10dac --- /dev/null +++ b/non-kitsune-foxes/fm_fox/src/current_conf.h @@ -0,0 +1,2 @@ +RFHS_CHALLENGE_NAME "Happy Hamster Fox" +FOX_KEYWORDS "Hunter should ask 'Are you the hamster fox?'" diff --git a/wifi/wifi_ap_client/src/conferences/9999skel.h b/wifi/wifi_ap_client/src/conferences/9999skel.h index 6fdaebb..f92a707 100644 --- a/wifi/wifi_ap_client/src/conferences/9999skel.h +++ b/wifi/wifi_ap_client/src/conferences/9999skel.h @@ -17,8 +17,8 @@ #if defined(AP) #if defined(EASY) -#define RFHS_CHALLENGE_NAME "WiFi AP Easy Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi AP Easy Fox?'" +// RFHS_CHALLENGE_NAME "WiFi AP Easy Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the WiFi AP Easy Fox?'" // Network config #define FSSID "Hiro WiFi AP Easy Fox" #define PSK "0123456789" @@ -39,8 +39,8 @@ #endif #if defined(HARD) -#define RFHS_CHALLENGE_NAME "WiFi AP Hard Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi AP Hard Fox?'" +// RFHS_CHALLENGE_NAME "WiFi AP Hard Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the WiFi AP Hard Fox?'" // Network config #define FSSID "YT WiFi AP Hard Fox" #define PSK "0123456789" @@ -61,8 +61,8 @@ #endif #if defined(FIVEEASY) -#define RFHS_CHALLENGE_NAME "WiFi 5GHz AP Easy Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi 5GHz AP Easy Fox?'" +// RFHS_CHALLENGE_NAME "WiFi 5GHz AP Easy Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the WiFi 5GHz AP Easy Fox?'" // Network config #define FSSID "Enzo WiFi 5GHz AP Easy Fox" #define PSK "0123456789" @@ -83,8 +83,8 @@ #endif #if defined(FIVEHARD) -#define RFHS_CHALLENGE_NAME "WiFi 5GHz AP Hard Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi 5GHz AP Hard Fox?'" +// RFHS_CHALLENGE_NAME "WiFi 5GHz AP Hard Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the WiFi 5GHz AP Hard Fox?'" // Network config #define FSSID "Lagos WiFi 5GHz AP Hard Fox" #define PSK "0123456789" @@ -107,8 +107,8 @@ #if defined(CLIENT) #if defined(EASY) -#define RFHS_CHALLENGE_NAME "WiFi Client Easy Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi Client Easy Fox?'" +// RFHS_CHALLENGE_NAME "WiFi Client Easy Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the WiFi Client Easy Fox?'" // set mac address #define FSSID "Ng WiFi Client Easy Fox" #define PSK "0123456789" @@ -123,8 +123,8 @@ #endif #if defined(HARD) -#define RFHS_CHALLENGE_NAME "WiFi Client Hard Fox" -#define FOX_KEYWORDS "Hunter should ask 'Are you the WiFi Client Hard Fox?'" +// RFHS_CHALLENGE_NAME "WiFi Client Hard Fox" +// FOX_KEYWORDS "Hunter should ask 'Are you the WiFi Client Hard Fox?'" // Network config #define FSSID "Mr Lee WiFi Client Hard Fox" #define PSK "0123456789"