campctf2023-chall-tis256

Zachtronics TIS100-inspired reversing challenge for CampCTF 2023
git clone https://git.sinitax.com/sinitax/campctf2023-chall-tis256
Log | Files | Refs | Submodules | README | sfeed.txt

notes (1250B)


      18bit cpu:
      2- 4 gpr
      3
      4bus-based interface between component:
      5- format:
      6  - 1 value: dest
      7  - 1 value: source
      8  - 1 value: command
      9  - 2 value: operands
     10
     11fixed size instructions (1-byte each):
     12- jnz (prefix) 0b000 (offset) 0bXXXXX (5bit signed)
     13- mov (prefix) 0b0010 (src) 0bXX (dst) 0bXX
     14- swp (prefix) 0b0011 (src) 0bXX (dst) 0bXX
     15- shl (prefix) 0b010 (src) 0bXX (sh) 0bXXX
     16- shr (prefix) 0b011 (src) 0bXX (sh) 0bXXX
     17- add (prefix) 0b1000 (src) 0bXX (dst) 0bXX
     18- sub (prefix) 0b1001 (src) 0bXX (dst) 0bXX
     19- xor (prefix) 0b1010 (src) 0bXX (dst) 0bXX
     20- and (prefix) 0b1011 (src) 0bXX (dst) 0bXX
     21- ldb (prefix) 0b1100 (reg-addr) 0bXX (reg-dst) 0bXX
     22- stb (prefix) 0b1101 (reg-src) 0bXX (reg-addr) 0bXX
     23- inp (prefix) 0b111000 (dst) 0bXX
     24- out (prefix) 0b111001 (src) 0bXX
     25- not (prefix) 0b111010 (reg) 0bXX
     26- jre (prefix) 0b111011 (reg) 0bXX
     27- inc (prefix) 0b111100 (reg) 0bXX
     28- dec (prefix) 0b111101 (reg) 0bXX
     29- hlt (prefix) 0b11111111
     30
     31program:
     32- read input into memory,
     33- compute some checksum over values
     34- validate checksum
     35
     36description:
     37- pff password managers, I store secrets in a TPM! (tesselated platform module)
     38- run with 'echo -ne "SECRET\x00" | ./tis256 chall.asm'
     39
     40credit the artist:
     41https://www.pixilart.com/art/bongo-cat-8c9e158c184a944