Tags: md5 aes aes-ecb xor 

Rating: 3.0

Well, this one was quite simple and yet quite disappointing for some.
You XOR `info_crypt.txt` with `info_clear.txt` to get XOR key.

```
with open('info_clear.txt', 'rb') as f:
data_clear = f.read()
with open('info_crypt.txt', 'rb') as f:
data_crypt = f.read()
wrong_key = ''.join([chr(ord(a) ^ ord(b)) for (a, b) in zip(data_clear, data_crypt)]) # Terrible Python oneliner to XOR stuff
```

As a result you would get such text:
```
i am a hydra agenT, coverly spying on the superHeroes. I am aware of the group that iS going to aTtack you...but Hydra has had its diffErences with you in the past, so i'm not going to maKe it vEry simple for You ....ecb...aes(I Vouch for this: 12345)...md5(this)...base64...

```

So couple of things going here – `THISTHEKEYIV` put there to kinda mislead you as cipher used is AES in ECB mode. Key is not `I Vouch for this: 12345` but `md5(this)` as hint suggested earlier.

So `b3aab305ba957fdffa0b62ae727492a9`?

You then just base64 decrypt the `superheroes_group_info_crypt.txt`, use that MD5 as key and... Nothing happens!

This part which made some people mad. In their point of view the solution required too much guessing. You are misleaded, but still "guess" the key, use hint, etc.
So the problem was in line break. If you remove last byte from XOR key and MD5 it, you, obviously, will get another hash – `285906a3d894059c42e1e9f640725f9b`.

Flag – `pctf{it's_the_justice_league_DC_for_life_hellya}`.

Original writeup (http://telegra.ph/Pragyan-CTF-2018-03-04#Xmen-OR-the-avengers-(100pts)).