I have a challenge in which I need to decrypt 32(?) bytes of plaintext, which by encryption resulted in 48 (this for sure) bytes of data.
It's a black box challenge, but managed to figure out the above and below.
According to this https://security.stackexchange.com/questions/207633/decrypting-aes-128-cbc-leads-to-first-block-being-correct-the-rest-corrupt?rq=1 my IV is wrong, even though I extracted it from the application, which encrypts the file. I have the ability to encrypt any file I want.
The funny thing is when I use AES-128-CBC in CyberChef or in my custom C program, which uses
OpenSSL I decrypt last 22 bytes of plaintext only. Other methods seem to fail to decrypt any senseful data.
Or is this a case of key wrapping/SIV/padding and if so how can I identify that and how can I decrypt the rest?
Since the IV is wrong I tried XORing it (like this https://cybergibbons.com/reverse-engineering-2/why-is-unauthenticated-encryption-insecure/ ) with the decrypted part, tried XORing the key, tried unwrapping the key and failed miserably, because of a IV mismatch...