Challenges
Source code encrypted with XOR
Reverse engineering
Hard
XOR encryption
Solves: 8
Source code encrypted with XOR
Author: CyberSamSU
Points
90
The attached dastur.enc file is the byte representation of a REAL .py script encrypted with a repeating XOR key. The key length is exactly: 4 bytes.
Use a known-plaintext attack: any Python script of this type always starts with the #!/usr/bin/env python3\n string. If you XOR the first 4 bytes of the encrypted file with the first 4 bytes of this known plaintext — the key itself will be revealed.
Once the key is found, apply it to the whole file (repeatedly) to restore the original .py source code and read the FLAG variable from it.
Attached files
dastur.enc
Log in to download
SHA-256 checksums
dastur.enc: c74aef44247f2fe76cf32e7a67066f58fabf5a99003ade38b5b9d69551eacf46
Theory: learn the topic
To submit a flag, log in.