On a recent engagement, I came across Electronic Code Book (ECB) encrypted data. While there’s a plethora of documentation about performing bit flipping in ECB, I couldn’t find any decent writeups on how to perform adaptive chosen plaintext attacks to recover ciphertext.
In ECB mode, each block of plaintext is encrypted independently with the key as illustrated by the diagram below.
(Source: Wikipedia)
Since each block of plaintext is encrypted with the key independently, identical blocks of plaintext will yield identical blocks of ciphertext.