Teaser Dragon CTF 2018 AES-128-TSB Write Up
This is a writeup of the AES-128 TSB challenge from Teaser Dragon CTF 2018
This is a writeup of the AES-128 TSB challenge from Teaser Dragon CTF 2018
This pwn challenge requires playing with the input of weights and biases of an AI chatbot to leak the flag.
The challenge required us to find a 10-float "genetic code" that maximizes a hidden "survival rating" function to an average of 95.0% within 100 generations. This is solved using a Genetic Algorithm, an optimization technique that mimics natural selection.
This attack is a classic cryptographic vulnerability called CBC Bit-Flipping Attack, which targets data encrypted using the CBC mode. The goal of the challenge is to get the server to decrypt a malicious packet that results in a specific, secret value for the `device_id` (0xdeadbabe).
The core problem is that the same secret message (P) is being encrypted repeatedly with a predictable, but incrementing, counter. Because the message is longer than the known plaintext, we must retrieve two consecutive ciphertexts (C0 and C1) to piece together the full encryption keystream (K0).