Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 794 Bytes

1x02..ware.md

File metadata and controls

31 lines (22 loc) · 794 Bytes
description
REV | 100 pts - 86 solves

1x02..ware

Description:

{% file src="../../.gitbook/assets/nice_game.py" %}

If we open nice_game.py it looks like a basic malware obfuscation, with some code base64 encoded and then eval of it:

eval(compile(base64.b64decode(b''.join(codes_dict.values()), '<string>', 'exec')))

Decoding it, we see other base64 encoded code. Decoding it again we finally have the "ransomware" source code.
But if we look closely we note that the function encrypt() won't do anything except to printing the flag base64 encoded.

def encrypt(file):print('Q1RGVUF7cjRuczBtdzRyZV9mNDFsZWR9')
$ echo "Q1RGVUF7cjRuczBtdzRyZV9mNDFsZWR92" | base64 -d
CTFUA{r4ns0mw4re_f41led}
CTFUA{r4ns0mw4re_f41led}