Close

CTF Results & Walkthrough (Part 4)

A project log for AND!XOR DC28 Badge

DEF CON may be canceled but we are still doing a badge

hyr0nHyr0n 08/16/2020 at 05:560 Comments

MORE FLAGS!!! WUT?!

The remaining flags were sprinkled throughout the internet, the badge, and other places throughout the year. Here's what you may have found or missed...I

Found code: PCB QR Code 

Go ahead scan it...see what happens...

Found code: Twitter 1

https://twitter.com/ANDnXOR/status/1291615817440694272

Found code: Twitter 2

https://twitter.com/ANDnXOR/status/1291874479723827200

Found code: Twitter 3 

https://twitter.com/ANDnXOR/status/1283615391504142336

Found code: Github

Do you watch our repository update status? Seems we pushed something to the DC24 badge a couple of months ago...Look at it in it's RAW form...

https://github.com/ANDnXOR/ANDnXOR_DC24_Badge/blob/master/README.md

Found code: About

Scroll to the bottom of the About section on the badge menu, it takes a while...

Found code: BASFUK.BAS

Did you think the Brainfuck interpreter was broken? Well yes it was, but if you fix the code compared to the original in MYBASIC samples...

Found code: POST

Take a close look in the Power On Self Test UART at start up. Normally you were on /dev/ttyACM0, this would be /dev/ttyACM1 (however its quick you may miss it). Better circumvent the RTOS providing middleware and just go directly to the UART breakout...on back... solder some RX, TX, and GND header pins

Found code: Scoreboard

Take a look at the source, there's a really weird comment...

Found code: Release Video

There's a secret in the TP. Can you find it?

Video

Found code: Release Video

We sure do like floppy disks...

Video

Found code: Release Video

Damn hipsters...

Video

Found code: T-Shirt

Did you look closely at the Shirts or the Sticker Swag included? Check out the print on the black wire...

sOXMxT

In Closing...

This was probably the largest amount of challenges and easter eggs we've ever done in one of our CTFs. He'll getting some of the badges via drops (which is outside the scope of the CTF obviously) had tons of create juices behind the various drop proxies across the land of hax0r. All that being said to pull this off takes a village. The Matt Damon Village. With that, we will leave you with a view of the header code of BENDER so you can see behind the scenes how this worked. It will be posted to github, but in short the framework for BENDER was made generic and all challenge content is kept in a source file. Here's what it looks like. Enjoy this while we work on the overall project post mortem.

/*****************************************************************************
 * Made with beer and late nights in California.
 *
 * (C) Copyright 2017-2020 AND!XOR LLC (https://andnxor.com/).
 *
 * PROPRIETARY AND CONFIDENTIAL UNTIL AUGUST 11th, 2020 then,
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * ADDITIONALLY:
 * If you find this source code useful in anyway, use it in another electronic
 * conference badge, or just think it's neat. Consider buying us a beer
 * (or two) and/or a badge (or two). We are just as obsessed with collecting
 * badges as we are in making them.
 *
 * Contributors:
 *     @andnxor
 *     @zappbrandnxor
 *     @hyr0n1
 *     @bender_andnxor
 *     @lacosteaef
 *      @f4nci3
 *      @Cr4bf04m
 *****************************************************************************/

#ifndef WH_BENDER_H
#define WH_BENDER_H

#include <zephyr.h>

#define URL_LEADERBOARD         "bit.ly/3egadD5"
#define URL_SLACK             "bit.ly/3eRTR4B"
#define URL_END             "bit.ly/2Aw1s9C"
#define MAP_CHAR_PLAYER         "☻"
#define MAP_CHAR_LOCKED         "°"
#define MAP_CHAR_UNLOCKED         "°"
#define MAP_CHAR_WALL             '*'
#define MAP_START_ROW             15
#define MAP_START_COL             11
#define MAP_MAX_ROWS             18
#define MAP_MAX_COLS             36
#define NUMBER_CHALLENGES         21
#define NUMBER_MAIN_CHALLENGES         10
#define NUMBER_LULZ_MAX         20
#define NUMBER_ITEMS             10
#define NUMBER_RECAPS             11
#define BENDER_NAME_FLAG         0x01
#define FREND_SYN_FLAG             0x83
#define FREND_ACK_FLAG             0x84

//Description Headers
#define BENDER_INTRO_MSG     "Badge Enabled Non Directive Enigma Routine Portable Interface SyStem:BENDER~PISSWlcm 2 d sprawl!Typ \"bender\" 2 git started or RTFM.MD!"
#define BENDER_CMDZ         "DeZ commands R wut U mostly uZ: hack, look, look at THING, loot, map, w a s d,frend, name, reset, gender, &...bender statz"
#define BENDER_HACK         "U eXplt things whch haz vulnz. Wen U hack stuff U must hack it w a tng itiz vulnerable 2. hack TNG1 wit TNG2. 2 complEt a chaLenG U \"hack flag wit ANSWR\""
#define BENDER_LOOT         "2 C *.* U haz typ \"loot show\"Itz not rly stealing f U found it right? So f U find som swEtsupa amazeballs TNG jst typ \"loot TNG\" & itz yorz"
#define BENDER_LOOT_SUCCESS     "U luv stealing!U luv tkng tNgs!"
#define BENDER_LOOK         "typ \"look\" 2 peep an area. f U wnt 2 git supa creepy & ^ clOs L%k @ an ITEMtyp \"look at ITEM\""
#define BENDER_FREND         "*Unlock Challngz!0 U giv ID 2 frend1 F $frend syn ID2 F giv U FLAG3 U $frend ack FLAG4 Both Profit!"
#define BENDER_FREND_SYN     "Ax frend 4 bdge ID. datz thR public key.U nEd 2 encrypt it w yor prv8 key. DFIU!Ex: $frend syn ID"
#define BENDER_FREND_ACK     "Did SOME1 GIV U a frend FLAG?Decrypt it here, git thR bAs unlocks & a flag 4 points. DFIU!Ex: $frend ack FLAG"
#define BENDER_RESET          "2 reset BENDER~PISS 1st contemplate DIS Lyf choice whIl staring n d mirrashaming yorself. f stil kewl w it typ \"reset Y\""
#define BENDER_RESET_Y         "Init 0 ~ Hodl on 2 yor butts.Rst Dun."
#define BENDER_RESET_y         "n U cnt uz lowR case y we sed uz UPPER CASE Y foLow instrcs o badge wiL explode"
#define BENDER_GENDER         "B comfortable w hu U are, chAng yor gender f nEd B.U can b: M, F, or XTyp...\"gender MFX\""
#define BENDER_GENDER_ERR     "Dat doesnt mAk sense...U must b gender :#)."
#define BENDER_GENDER_M     "SX chAng sucSful: Man-Bot!"
#define BENDER_GENDER_F     "SX chAng sucSful: Fem-Bot!"
#define BENDER_GENDER_X     "SX chAng sucSful: NonBinary-Bot!"
#define BENDER_GENDER_PRO_M     "Mr "
#define BENDER_GENDER_PRO_F     "Ms "
#define BENDER_GENDER_PRO_X     "Mx "

//Main Storyling Thingz
#define CHALLENGE_MASTER_UNLOCK         "NEVERGONNAGIVEYOUUPNEVERGONNALETYOUDOWN"
#define CHALLENGE_DESC_LOCKED             "D chaLenG iz locked! Xchang frend flag 4 unlock!"
#define CHALLENGE_TARGET_HACKED         "O damn, we hav a l337 haxor Ovr hEr. d louder U R d less U hEr.tAk a L%k @ yor pwned target."
#define CHALLENGE_TARGET_NOT_HACKED_YET     "Zzt. Derp. Cnt comply. U must drink aL d b%z & hack aL d thingz."

//Main Challenge - OSINT #1 Twitter
#define CHALLENGE_FLGR_00         0x64
#define CHALLENGE_DESC_00         "Wut? Itz MrBill. Hes trying 2 coLec OSINT on Hs net of hard hat SD haXor fam.StA classy & giv him wot he wants."
#define CHALLENGE_ANSW_00         "420-69-1337"     //OSINT - Most common reported SSN from BSSD
#define CHALLENGE_TARGET_00_0_NAME     "OSINT"
#define CHALLENGE_TARGET_00_0_DESC     "he pEpn SSN off W3s" 
#define CHALLENGE_TARGET_00_1_NAME     "SSN"
#define CHALLENGE_TARGET_00_1_DESC     "k not boomer, dat iz social security #"
#define CHALLENGE_TOOL_DESC_0         "MALTEGO"        //THIS HACKS CHALLENGE_TARGET_00_0_NAME

//Main Challenge - CRYPTO/ENCODING #1 Keyboard Walk Encoding
#define CHALLENGE_FLGR_01         0x65
#define CHALLENGE_DESC_01         "U find a locked Q10 w tiny ENGRAVING.itz asking 4 a PW.A BIRB flies overhead, you l%k ^ & 2 d L."
#define CHALLENGE_ANSW_01         "canada"             //CRYPTO - Keyboard shift cypher up and to the left from the engraving (with wraparound): tzizcz
#define CHALLENGE_TARGET_01_0_NAME     "ENGRAVING"
#define CHALLENGE_TARGET_01_0_DESC     "on d bak d following iz inscribed: tzizcz"
#define CHALLENGE_TARGET_01_1_NAME     "BIRB"
#define CHALLENGE_TARGET_01_1_DESC     "Itz not real, birbs R guvment survlnce drone dat wraprowndd globe ch1rpin \'key key\'"
#define CHALLENGE_TOOL_DESC_1         "AMSCOPE"        //THIS HACKS CHALLENGE_TARGET_01_0_NAME

//Main Challenge - REVERSE ENGINEERING #1 Derbycon Trevor Firmware
#define CHALLENGE_FLGR_02         0x66
#define CHALLENGE_DESC_02         "Theres an elctrnk bug. ! d NSA kind bt d ROACH frm con kind.PrograMn INTRFAC exposed. f only U c%d hack dis HW."
#define CHALLENGE_ANSW_02         "ROUNDERS"         //REVERSE ENGINEERING - Binary is hidden as DERBY.RAW, use strings or Ghidra on it
#define CHALLENGE_TARGET_02_0_NAME     "INTRFAC"
#define CHALLENGE_TARGET_02_0_DESC     "D mny bug badge blings raw whIl itz binary dumps.Itz az f frm warez iz jst hidden n pln cite."
#define CHALLENGE_TARGET_02_1_NAME     "ROACH"
#define CHALLENGE_TARGET_02_1_DESC     "U haz a senS of longing 4 Lulvil.Trevor 4get icing Dave whIl dressed az a *<|:)."
#define CHALLENGE_TOOL_DESC_2         "ICEDEBUGGER"    //THIS HACKS CHALLENGE_TARGET_02_0_NAME

//Main Challenge - REVERSE ENGINEERING #2 Find the E-Mail Address
#define CHALLENGE_FLGR_03         0x67
#define CHALLENGE_DESC_03         "U cUm ax a supa secure medical LAPPY covered n stickers.It hz a TACO_CORP_PROMPT on itz scrEn."
#define CHALLENGE_ANSW_03         "8GAT35@VAXX34.0RG"//REVERSE ENGINEERING - Binary is on flash under /usr/bin
#define CHALLENGE_TARGET_03_0_NAME     "LAPPY"
#define CHALLENGE_TARGET_03_0_DESC     "D credz auth binary wz XtractD. wot acownt iz Usd 2 login? Saved undRyouZer binz..."
#define CHALLENGE_TARGET_03_1_NAME     "TACO_CORP_PROMPT"
#define CHALLENGE_TARGET_03_1_DESC     "D prolly not HIPAA compliant login 4 Taco Corps medical rEsrch divisN.Did dey release d virus only 2 seL thR salsa vaccine az a cure?"
#define CHALLENGE_TOOL_DESC_3         "RUBBER_DUCKY"        //THIS HACKS CHALLENGE_TARGET_03_0_NAME

//Main Challenge - CRYPTO/ENCODING #2 Morse Encoding where speed is related to temperature
#define CHALLENGE_FLGR_04         0x68
#define CHALLENGE_DESC_04         "A lRg comms tower itz n not powered, a PIGEON_HOLE gap exists whch needs somTIN4 cndctvity. l%kin awA U notic som CLOUDS. c%d DIS b d coz of it aL. d rona?"
#define CHALLENGE_ANSW_04         "5GT0W3RZDuH"     //5GT0W3RZDuH (HEX)-> 35 47 54 30 57 33 52 5a 44 75 48 (MORSE) -> CHALLENGE_HACK_04 (BELOW)
#define CHALLENGE_HACK_04         "...-- .....  ....- --...   ..... ....-   ...-- -----   ..... --...   ...-- ...--   ..... ..---   ..... .-   ....- ....-   --... .....   ....- ---.."
#define CHALLENGE_TARGET_04_0_NAME     "PIGEON_HOLE"
#define CHALLENGE_TARGET_04_0_DESC     "woah, d bIrb ComplEtd d cIrcuit! a vanilla iCe trak starts playin &lyts r flashin waaa t% fst. nEd 2 lit'rally netflIx & Chill 2 slothngz dwn b4 i git a hedakE"
#define CHALLENGE_TARGET_04_1_NAME     "CLOUDS"
#define CHALLENGE_TARGET_04_1_DESC     "R thOs clouds? problE not, thOs R chem trails.Dey put a hex on U morse so thN U tink."
#define CHALLENGE_TOOL_DESC_4         "BIRB"        //THIS HACKS CHALLENGE_TARGET_04_0_NAME

//Main Challenge - CRYPTO/ENCODING #3 RS232 "Serial UART" blinks
#define CHALLENGE_FLGR_05         0x69
#define CHALLENGE_DESC_05         "u c Mt BER cn, sobr thotz :( mAbE U cn cure d rona by putn smTIN inside yo slf.U scratch BUTT whIl tinkiN bout it."
#define CHALLENGE_ANSW_05         "1NH@L3LY507"        //1NH@L3LY507 (BINARY) -> (RS232 Protocol) -> Prepend 0 Start Bit + Invert LSB/MSB Order + Append 1 Stop Bit
#define CHALLENGE_HACK_05         "0100011001 0011100101 0000100101 0000000101 0001100101 0110011001 0001100101 0100110101 0101011001 0000011001 0111011001"
#define CHALLENGE_TARGET_05_0_NAME     "BUTT"
#define CHALLENGE_TARGET_05_0_DESC     "Yor gutz lite ^ & blink. Itz supa serial 2 stRt tink bout lEst & mstsigNfict tNgs thN stop, cuz DIS mA b d wrng cure."
#define CHALLENGE_TARGET_05_1_NAME     "BER"
#define CHALLENGE_TARGET_05_1_DESC     "Modern tImz Fruitlands. datz a damn gud beR, despite it bn Mt."
#define CHALLENGE_TOOL_DESC_5         "UVLIGHT"        //THIS HACKS CHALLENGE_TARGET_05_0_NAME

//Main Challenge - PHREAKING - Elevator Hacking
#define CHALLENGE_FLGR_06         0x6A
#define CHALLENGE_DESC_06         "U entR a building & wiLCaruana runs awA az U apRch an OpN elvt0r. Yln he hz a:X & dropz a CELL. Thr iz l0kd CALLBOX bElO d flOr btNz."
#define CHALLENGE_ANSW_06         "OTIS"
#define CHALLENGE_HACK_06         "LUG caL bawx iz n chaLenG 4 you, d trusT baL pik pWns it n 2nds."
#define CHALLENGE_TARGET_06_0_NAME     "CALLBOX"
#define CHALLENGE_TARGET_06_0_DESC     "Bt hW u caL? Etchd w wot wz problE a hevE gauge wire U c ZXh0LjQxNzc=" //Ext 4177
#define CHALLENGE_TARGET_06_1_NAME     "CELL"
#define CHALLENGE_TARGET_06_1_DESC     "Therz only 1 fone # n d recnt caL lst 312d3333372d4d41542d492d4f4245592e2e2e4d6179422064726f7020442059"
#define CHALLENGE_TOOL_DESC_6         "LOCKPICK"        //THIS HACKS CHALLENGE_TARGET_06_0_NAME 

///Main Challenge - SIGINT - POCSAG Payphone Challenge
#define CHALLENGE_FLGR_07         0x6B
#define CHALLENGE_DESC_07         "A PAYPHONE by a run dwn gas statN. P$ shows -$1337 / gal.WUT?! wiLCaruana again, n he iz runN awA :-d & shooting a laser @ U."
#define CHALLENGE_ANSW_07         "DUALCORE"
#define CHALLENGE_HACK_07         "d # U R clng cnt b rEchD pls hang ^ & try agen: 312d3333372d4d41542d492d4f4245592e2e2e4d6179422064726f7020442059"
#define CHALLENGE_TARGET_07_0_NAME     "PAYPHONE"
#define CHALLENGE_TARGET_07_0_DESC     "d fone worx bt itz auto dialing a messed ^ #. how Ls c%d U caL it?& u 1Dr wut ^ wit itz COINBOX..."
#define CHALLENGE_TARGET_07_1_NAME     "COINBOX"
#define CHALLENGE_TARGET_07_1_DESC     "it hz Bin pryed OpN & NE coins put n faL rght bak out.N bak u C msg: Rm9yIGEgZ29vZCB0aW1lIGNhbGwgZXh0LiAyMzIz" //Ext 2323
#define CHALLENGE_TOOL_DESC_7         "QUARTER"            //THIS HACKS CHALLENGE_TARGET_07_0_NAME

//Main Challenge - CRYPTO/ENCODING #4 NTLM PASSWORD CRACKING
#define CHALLENGE_FLGR_08         0x6C
#define CHALLENGE_DESC_08         "Pon d flOr ther sits a glitter covered tink pad frm TyMkrs.Itz old, runN win 2000, & evN hz an IOMEGA_DRIVE."
#define CHALLENGE_ANSW_08         "m3atl0af"
#define CHALLENGE_TARGET_08_0_NAME     "IOMEGA_DRIVE"
#define CHALLENGE_TARGET_08_0_DESC     "W a solid clik d disk snaps in2 plAc.Un4tuN8ly d files R credential locked by d win SAM"
#define CHALLENGE_TARGET_08_1_NAME     "SAM"
#define CHALLENGE_TARGET_08_1_DESC     "Navigating 2 d win SYS thirty two config SAM U find:0E7FDE76B8A417953D640D5CDB0D9B72"
#define CHALLENGE_TOOL_DESC_8         "ZIP_DISK"        //THIS HACKS CHALLENGE_TARGET_08_0_NAME

//Main Challenge - CRYPTO/ENCODING #5 SLACKBOT
#define CHALLENGE_FLGR_09         0x6D
#define CHALLENGE_DESC_09         "Theres a robotic HED on d ground, bt it iz lacking d milliamps.FAC & reminds of U of pure annoyance."
#define CHALLENGE_ANSW_09         "iCanHazEncryptI0n?"
#define CHALLENGE_TARGET_09_0_NAME     "HED"
#define CHALLENGE_TARGET_09_0_DESC     "U cn ask me simpl questions bout how Slack works,o jst typ a few keywords lIk \"m355@g3\" bt TLK 2yorself so others lIk guvment dun knO"
#define CHALLENGE_TARGET_09_1_NAME     "FAC"
#define CHALLENGE_TARGET_09_1_DESC     "Blu grEn red yeLo w two eyes som brows & wot d fuk iz dat a nose o mouth?!"
#define CHALLENGE_TOOL_DESC_9         "BATTERY"        //THIS HACKS CHALLENGE_TARGET_09_0_NAME

//Recap Challenge - CRYPTO/ENCODING #6 RECAP
#define CHALLENGE_FLGR_20 0x85
#define CHALLENGE_DESC_20 "WTF hapnd 2 DIS world since DC27? WeL AND!XOR rOt it n a note, tore it up, &...itz randomly spred throughout d wrld. Hav :) putting it bak 2geder 4 recap"
#define CHALLENGE_ANSW_20 "DXDCABUUUUR"
#define BENDER_RECAP "WTF hapnd 2 DIS world since DC27? WeL AND!XOR rOt it n a note, tore it up, &...itz randomly spred throughout d wrld. Hav :) putting it bak 2geder 4 recap"
#define RECAP_HEADER "U find r3cap papR..."
#define RECAP_00 "44 20 64 63 32 37 20 61 6e 64 21 58 6f 72 20 6e 75 63 6c 65 61 72 20 77 6e 74 72 20 62 61 64 67 65 20 26 20 68 61 63 6b 66 6f 72 73 61 74 61 6e 20 70 61 6e 64 65"
#define RECAP_01 "6d 69 63 20 62 61 64 67 65 20 67 6f 74 20 64 72 75 6e 6b 2c 20 68 6f 6f 6b 64 20 75 70 2c 20 26 20 63 61 75 73 65 64 20 44 20 72 6f 6e 61 20 66 72 6d 20 73 6f 6d"
#define RECAP_02 "20 6d 65 73 73 65 64 20 5e 20 73 74 64 2e 20 74 68 6e 20 64 65 66 20 43 6f 6e 20 77 7a 20 63 61 6e 63 65 6c 6c 65 64 2e 20 34 20 72 65 61 6c 73 69 65 73 2e 20 73"
#define RECAP_03 "69 6e 63 65 20 74 68 6e 20 77 65 76 65 20 73 70 72 65 64 20 72 75 6d 6f 72 73 20 63 75 7a 20 77 65 20 72 20 3a 22 29 20 62 6f 75 74 20 64 20 68 25 6b 20 5e 2e 20"
#define RECAP_04 "72 75 6d 6f 72 73 20 73 75 63 68 20 6c 69 6b 20 69 74 20 77 7a 20 62 61 74 73 2c 20 35 20 67 20 63 65 6c 20 74 6f 77 65 72 73 2c 20 62 69 72 64 73 2c 20 62 69 6c"
#define RECAP_05 "6c 20 67 61 74 65 73 20 74 72 79 69 6e 67 20 32 20 6d 41 6b 20 6d 6f 6e 65 20 6f 66 66 20 6f 66 20 76 61 63 63 69 6e 65 73 2c 20 63 6f 6e 76 69 6e 63 69 6e 67 20"
#define RECAP_06 "70 6f 74 75 73 20 32 20 63 6f 6e 76 69 6e 63 65 20 75 20 32 20 64 72 69 6e 6b 20 42 6c 65 61 63 68 2e 2e 2e 20 66 20 55 20 62 6c 65 76 20 6e 65 20 6f 66 20 64 61"
#define RECAP_07 "74 20 55 20 72 20 64 75 6d 62 2e 20 31 30 30 30 25 20 66 6b 6e 20 6c 75 67 2e 20 63 6f 72 6f 6e 61 76 69 72 75 73 20 73 75 78 20 26 20 64 65 2d 72 61 69 6c 65 64"
#define RECAP_08 "20 6f 75 72 20 61 6e 6e 75 61 6c 20 63 6f 6e 20 78 70 65 72 65 6e 73 2e 20 69 67 6e 6f 72 20 61 6c 20 64 61 74 20 64 75 6d 62 20 73 63 68 65 74 20 26 20 68 61 76"
#define RECAP_09 "20 3a 29 20 68 61 63 6b 69 6e 67 20 64 69 73 20 62 61 64 67 65 2e 20 77 65 20 68 6f 70 20 69 74 20 62 72 69 6e 67 73 20 55 20 3a 29 20 26 20 68 61 70 65 6e 73 2e"
#define RECAP_10 "20 55 20 73 68 75 64 20 68 61 63 6b 20 66 6c 61 67 20 77 69 74 2e 2e 2e 75 70 70 52 20 63 61 73 65 2e 2e 2e"

//Lulz Quiz
#define CHALLENGE_DESC_10 "~LULZ QUIZ~(0)EMACS(1)VIM(2)NANO$hack flag wit #"
#define CHALLENGE_ANSW_10 "1"
#define CHALLENGE_FLGR_10 0x6E
#define CHALLENGE_FLGW_10 0x6F

#define CHALLENGE_DESC_11 "~LULZ QUIZ~Did Carole Baskin kill her OM?(0)Yes(1)No$hack flag wit #"
#define CHALLENGE_ANSW_11 "0"
#define CHALLENGE_FLGR_11 0x70
#define CHALLENGE_FLGW_11 0x71

#define CHALLENGE_DESC_12 "~LULZ QUIZ~Pineapple on pizza?(0)Yes(1)No$hack flag wit #"
#define CHALLENGE_ANSW_12 "0"
#define CHALLENGE_FLGR_12 0x72
#define CHALLENGE_FLGW_12 0x73

#define CHALLENGE_DESC_13 "~LULZ QUIZ~(0)OSX(1)Windows(2)Linux(3)BSD$hack flag wit #"
#define CHALLENGE_ANSW_13 "2"
#define CHALLENGE_FLGR_13 0x74
#define CHALLENGE_FLGW_13 0x75

#define CHALLENGE_DESC_14 "~LULZ QUIZ~(0)Red Team(1)Blu Team(2)Purpl Team$hack flag wit #"
#define CHALLENGE_ANSW_14 "2"
#define CHALLENGE_FLGR_14 0x76
#define CHALLENGE_FLGW_14 0x77

#define CHALLENGE_DESC_15 "~LULZ QUIZ~(0)Spaces(1)Tabs$hack flag wit #"
#define CHALLENGE_ANSW_15 "1"
#define CHALLENGE_FLGR_15 0x78
#define CHALLENGE_FLGW_15 0x79

#define CHALLENGE_DESC_16 "~LULZ QUIZ~(0)Drop 0-Day(1)Notify Vendor$hack flag wit #"
#define CHALLENGE_ANSW_16 "1"
#define CHALLENGE_FLGR_16 0x7A
#define CHALLENGE_FLGW_16 0x7B

#define CHALLENGE_DESC_17 "~LULZ QUIZ~(0)Hack(1)Slp(2)Et(3)showR$hack flag wit #"
#define CHALLENGE_ANSW_17 "3"
#define CHALLENGE_FLGR_17 0x7C
#define CHALLENGE_FLGW_17 0x7D

#define CHALLENGE_DESC_18 "~LULZ QUIZ~(0)tst n devlpmnt(1)tst n production(2)dun tst$hack flag wit #"
#define CHALLENGE_ANSW_18 "2"
#define CHALLENGE_FLGR_18 0x7E
#define CHALLENGE_FLGW_18 0x80

#define CHALLENGE_DESC_19 "~LULZ QUIZ~(0)Buffer Underflow(1)Buffer Overflow$hack flag wit #"
#define CHALLENGE_ANSW_19 "-1" //LOLZ
#define CHALLENGE_FLGR_19 0x81
#define CHALLENGE_FLGW_19 0x82

typedef struct{ 
    uint8_t index;
    bool challenge;
}challenge_tracker_t;

typedef struct{ 
    uint8_t location_row;
    uint8_t location_col;
    uint8_t flag_cmd_right;
    uint8_t flag_cmd_wrong;
    bool discovered;
    bool unlocked;
    bool hacked;
    bool solved;
    bool right;
    bool lulz;
}challenge_t;

typedef struct{ 
    uint8_t location_row;
    uint8_t location_col;
    bool haz;
}item_t;

typedef struct{ 
    uint8_t location_row;
    uint8_t location_col;
}recap_t;

typedef struct{
    char gender;
    uint8_t location_row;
    uint8_t location_col;
    uint8_t random_unlock_0;
    uint8_t random_unlock_1;
    uint8_t random_unlock_2;
    challenge_t challenges[NUMBER_CHALLENGES];
    item_t items[NUMBER_ITEMS];
    recap_t recap[NUMBER_RECAPS];
}bender_data_t;

extern void wh_bender_data_init();

#endif

Discussions