Composite
Composite
Platform: taipanbyte | Category: Crypto | Type: Challenge | Difficulty: Easy | OS: NA | Author: XESXOR | Date: 2026-02-14 | Status: Solved Techniques: binary_decode, hex_decode, layered_encoding, rot13
Summary
Task: Decode a multi-layered encoded binary string. Solution: Apply three decoding layers sequentially: binary (8-bit chunks) to hex string, hex to ASCII revealing a ROT13-shifted flag structure, then ROT13 to recover the plaintext flag.
Composite — TaipanByte CTF
Description
A zip file was provided via a download link (behind anti-bot protection with slide captcha / PoW). The archive txt.zip contained a single file txt.txt with a long binary string.
Analysis
- The file
txt.txtcontains a long string of0s and1s — clearly binary encoding - The challenge name "Composite" hints at a composite cipher — multiple encoding layers stacked on top of each other
- Decoding proceeds layer by layer until the flag is revealed
Raw Data
001101000011011100110100011001100011011101100010001101010011000000110100001100100011010101100001001101000011001100110100001100100011010000110110001101010011011000110100001101110011010100110010001101010110011000110101001100000011010100110110001101000011001100110101001101010011010100110010001101000011010100110101011001100011010100110110001101000011011000110101011001100011010000110001001101000011001000110100001101110011010101100110001101010011010100110100011001010011010000110101001101010011000100110011011001100011011101100100
Solution
Layer 1: Binary to ASCII
The binary string is composed of 8-bit chunks. Decoding each byte to its ASCII character:
474f7b50425a4342465647525f5056435552455f56465f4142475f554e45513f7d
This is clearly a hexadecimal string (only characters 0-9, a-f).
Layer 2: Hex to ASCII
Decoding the hex string to ASCII:
GO{PBZCBFVGR_PVCURE_VF_ABG_UNEQ?}
This looks like a flag with { and } delimiters, but the text is garbled. The prefix GO instead of TB (TaipanByte flag format) and the recognizable structure suggest ROT13 encoding — each letter is shifted by 13 positions in the alphabet.
Layer 3: ROT13
Applying ROT13 (Caesar cipher with shift 13):
| Original | ROT13 |
|---|---|
| G → T | O → B |
| P → C | B → O |
| P → C | V → I |
| V → I | F → S |
| A → N | B → O |
| U → H | N → A |
Result: TB{REDACTED}
Solve Script
python read-only • copy allowed#!/usr/bin/env python3 """ Composite — TaipanByte CTF Three-layer composite cipher: Binary → Hex → ROT13 """ import codecs # Raw binary data from txt.txt binary_str = ( "00110100001101110011010001100110001101110110001000110101" "00110000001101000011001000110101011000010011010000110011" "00110100001100100011010000110110001101010011011000110100" "00110111001101010011001000110101011001100011010100110000" "00110101001101100011010000110011001101010011010100110101" "00110010001101000011010100110101011001100011010100110110" "00110100001101100011010101100110001101000011000100110100" "00110010001101000011011100110101011001100011010100110101" "00110100011001010011010000110101001101010011000100110011" "01100110001101110110010000000000000000000000000000000000" ) # Layer 1: Binary → ASCII (hex string) chars = [] for i in range(0, len(binary_str), 8): byte = binary_str[i:i+8] if byte == '00000000': break chars.append(chr(int(byte, 2))) hex_str = ''.join(chars) print(f"Layer 1 (Binary → ASCII): {hex_str}") # Layer 2: Hex → ASCII (ROT13-encoded flag) rot13_str = bytes.fromhex(hex_str).decode() print(f"Layer 2 (Hex → ASCII): {rot13_str}") # Layer 3: ROT13 → plaintext flag flag = codecs.decode(rot13_str, 'rot_13') print(f"Layer 3 (ROT13): {flag}")
Simplified One-Liner
python read-only • copy allowed#!/usr/bin/env python3 import codecs data = "001101000011011100110100011001100011011101100010001101010011000000110100001100100011010101100001001101000011001100110100001100100011010000110110001101010011011000110100001101110011010100110010001101010110011000110101001100000011010100110110001101000011001100110101001101010011010100110010001101000011010100110101011001100011010100110110001101000011011000110101011001100011010000110001001101000011001000110100001101110011010101100110001101010011010100110100011001010011010000110101001101010011000100110011011001100011011101100100" # Binary → Hex → ASCII → ROT13 hex_str = ''.join(chr(int(data[i:i+8], 2)) for i in range(0, len(data), 8)) flag = codecs.decode(bytes.fromhex(hex_str).decode(), 'rot_13') print(flag) # TB{REDACTED}
Output
TB{REDACTED}
Encoding Layer Detection Cheatsheet
| Observation | Likely Encoding |
|---|---|
Only 0 and 1, length divisible by 8 | Binary (8-bit ASCII) |
Only 0-9 and a-f/A-F | Hexadecimal |
| Recognizable structure but shifted letters | ROT13 / Caesar |
= or == padding at end | Base64 |
| Uppercase + digits 2-7 only | Base32 |
| |
Lessons Learned
- The challenge name is always a hint — "Composite" directly tells you the cipher is multi-layered
- When decoding layered ciphers, examine each intermediate result carefully to identify the next encoding
- ROT13 is easily spotted when the result has a recognizable structure (flag format with
{and}) but the letters don't make sense - Anti-bot protections (captcha, PoW) on download links can be bypassed with headless browsers like Playwright