Skip to main content
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
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −9 pts Log in
Hint 2 −18 pts Log in
Hint 3 −27 pts Log in
To submit a flag, log in.

First solvers

1. W.o.X 17.09.2026
2. Qodirxon Yoqubjonov 18.09.2026
3. Faxriddin Oripov 02.10.2026
4. testrejim 09.10.2026
5. Абдул 09.10.2026
6. Mirjaxon Qaxxarov 27.10.2026
7. Odam 04.11.2026
8. arcanum 11.11.2026