Bazirovanaya baza (Based Base)
Bazirovanaya baza (Based Base)
Platform: CUSTOM | Category: Crypto | Type: Challenge | Difficulty: Easy | OS: N/A | **Author: XESXOR Techniques: ascii_to_char, base32_decode, base64_decode
Summary
Walkthrough of the CUSTOM Crypto Bazirovanaya baza (Based Base). Task: decode a multi-layer encoded string from a file. Solution: sequentially decode Base64, Base32, and ASCII character codes to recover the flag.
Description
"Poreflesiruyem" (Let's reflect)
Files provided: crypt3.txt
Initial Analysis
The challenge name "Bazirovanaya baza" (Based base) is a strong hint that multiple base encodings are involved. The description "Poreflesiruyem" (Let's reflect) suggests we need to reverse/decode the encoding process.
The file crypt3.txt contains:
R1k0Q0FPQlZFQTNET0lCWEdVUURNT0pBSEFaQ0FPSlFFQVlURU1aQUdRNFNBTkpWRUE0VEtJQlVIRVFES01aQUhFMlNBT0pZRUEyVEVJQlZHTVFES01KQUdFWkRLPT09=
This is clearly Base64 encoded (alphanumeric characters with = padding at the end).
Solution
Layer 1: Base64 Decode
bash read-only • copy allowedecho "R1k0Q0FPQlZFQTNET0lCWEdVUURNT0pBSEFaQ0FPSlFFQVlURU1aQUdRNFNBTkpWRUE0VEtJQlVIRVFES01aQUhFMlNBT0pZRUEyVEVJQlZHTVFES01KQUdFWkRLPT09=" | base64 -d
Result:
GY4CAOBVEA3DOIBXGUQDMOJAHAZCAOJQEAYTEMZAGQ4SANJVEA4TKIBUHEQDKMZAHE2SAOJYEA2TEIBVGMQDKMJAGEZDK===
Layer 2: Base32 Decode
The output has characteristics of Base32 encoding:
- Uppercase letters A-Z
- Digits 2-7
- Padding with
===
python read-only • copy allowedimport base64 result = base64.b32decode('GY4CAOBVEA3DOIBXGUQDMOJAHAZCAOJQEAYTEMZAGQ4SANJVEA4TKIBUHEQDKMZAHE2SAOJYEA2TEIBVGMQDKMJAGEZDK===') print(result.decode())
Result:
68 85 67 75 69 82 90 123 49 55 95 49 53 95 98 52 53 51 125
Layer 3: ASCII Codes to Characters
The output is a series of space-separated decimal numbers - ASCII character codes!
python read-only • copy allowedcodes = '68 85 67 75 69 82 90 123 49 55 95 49 53 95 98 52 53 51 125'.split() flag = ''.join(chr(int(c)) for c in codes) print(flag)
Result: DUCKERZ{REDACTED}
Complete Solution Script
python read-only • copy allowed#!/usr/bin/env python3 """ Duckerz CTF - Bazirovanaya baza (Based Base) Multi-layer encoding: Base64 -> Base32 -> ASCII codes """ import base64 # Original encoded string from crypt3.txt encoded = "R1k0Q0FPQlZFQTNET0lCWEdVUURNT0pBSEFaQ0FPSlFFQVlURU1aQUdRNFNBTkpWRUE0VEtJQlVIRVFES01aQUhFMlNBT0pZRUEyVEVJQlZHTVFES01KQUdFWkRLPT09=" # Layer 1: Base64 decode layer1 = base64.b64decode(encoded).decode() print(f"[+] After Base64: {layer1}") # Layer 2: Base32 decode layer2 = base64.b32decode(layer1).decode() print(f"[+] After Base32: {layer2}") # Layer 3: ASCII codes to string codes = layer2.split() flag = ''.join(chr(int(c)) for c in codes) print(f"[+] Flag: {flag}")
Meta Analysis
The flag 17_15_b453 is leetspeak wordplay:
17= "IT"15= "IS"b453= "BASE"
So the flag reads: "IT IS BASE" - a meta-reference to the multi-layer base encoding theme of the challenge!
Encoding Chain
Original: DUCKERZ{REDACTED}
|
v (ASCII codes)
68 85 67 75 69 82 90 123 49 55 95 49 53 95 98 52 53 51 125
|
v (Base32 encode)
GY4CAOBVEA3DOIBXGUQDMOJAHAZCAOJQEAYTEMZAGQ4SANJVEA4TKIBUHEQDKMZAHE2SAOJYEA2TEIBVGMQDKMJAGEZDK===
|
v (Base64 encode)
R1k0Q0FPQlZFQTNET0lCWEdVUURNT0pBSEFaQ0FPSlFFQVlURU1aQUdRNFNBTkpWRUE0VEtJQlVIRVFES01aQUhFMlNBT0pZRUEyVEVJQlZHTVFES01KQUdFWkRLPT09=
Key Takeaways / Lessons
- Mastering ascii_to_char, base32_decode, base64_decode was key to this challenge.
- Always check for common misconfigurations and verify assumptions.
Crafted by XESXOR Research • 2026-01-09 • CUSTOM • Bazirovanaya baza (Based Base) • Difficulty: Easy