Tags: reversing
Rating:
A full video walkthrough can be found here: [
https://youtu.be/OPYt55LVwSM?t=1162](
https://youtu.be/OPYt55LVwSM?t=1162)
Solution:
The server is doing a XOR with some ciphertext and a 16byte key.
To get the key we can load up gdb and run:
```
x/s keygen(0xdeedbeef)
```
Then we can copy the ciphertext and key into a python file and do the xor:
```
key = [10, 52, 237, 211, 5, 251, 97, 153, 224, 185, 168, 241, 13, 233, 3, 198]
data = [
73,
91,
131,
180,
119,
154,
21,
236,
140,
216,
220,
152,
98,
135,
112,
230,
101,
90,
205,
183,
96,
152,
19,
224,
144,
205,
193,
159,
106,
201,
119,
174,
111,
20,
139,
191,
100,
156,
79,
185,
183,
209,
193,
157,
104,
201,
112,
174,
101,
70,
153,
243,
109,
158,
19,
252,
192,
208,
219,
209,
116,
134,
118,
180,
42,
71,
154,
182,
96,
143,
65,
235,
133,
206,
201,
131,
105,
199,
9,
204,
96,
87,
153,
181,
126,
169,
82,
239,
133,
203,
219,
152,
99,
142,
92,
175,
121,
107,
139,
166,
107,
164,
5,
246,
191,
212,
199,
131,
104,
200,
126,
0,
]
import pwn
print(pwn.xor(data, key))
```
```
b'Congratulations on decrypting the flag. While short here is your sweet reward.\n\njctf{R3versing_is_fun_do_more!}\xc6'
```