Одноразовый блокнот (One-Time Pad)
XESXOR9/10/20261 min read
#crypto#custom#medium#hex-encoding-recognition-and-d#misdirection-awareness-(task-n#flag-extraction-from-plaintext#linux
Одноразовый блокнот (One-Time Pad)
Platform: hackerlab | Category: Crypto | Type: Challenge | Difficulty: Medium | OS: Linux | Author: XESXOR | Date: 2026-01-02 | Status: Solved Techniques: Hex encoding recognition and decoding, Misdirection awareness (task name vs actual solution), Flag extraction from plaintext
Summary
Одноразовый блокнот (One-Time Pad) - hackerlab
Description
"Возможно, нужно додумать что-то самому, но что именно?"
(Perhaps you need to figure out something yourself, but what exactly?)
Analysis
- Task files: task.zip contains task.txt
- Content: 13 lines of hex-encoded data
- Misdirection: The name "One-Time Pad" hints at complex cryptography, but the solution is much simpler
Encoding Recognition
Hex-encoded data is easy to recognize:
- Only characters 0-9 and a-f
- Even number of characters (each byte = 2 hex characters)
- Long strings without spaces
Solution
Hex Decoding
bash read-only • copy allowed# Decode each line while read line; do echo "$line" | xxd -r -p echo done < task.txt
Python Alternative
python read-only • copy allowed#!/usr/bin/env python3 with open('task.txt', 'r') as f: for line in f: line = line.strip() if line: decoded = bytes.fromhex(line).decode('utf-8', errors='ignore') print(decoded)
Decoding Result
The decoded text is educational content about cryptography in English.
Line 10 contains the flag:
Take flag - CODEBY{REDACTED} and go away, bro! You are cool.
Lessons
- Don't trust the name: "One-Time Pad" is misdirection, the real solution is simple hex decoding
- Start simple: Always check basic encodings (hex, base64) before complex attacks
- Flag confirms:
REDACTED= "Oh no, OTP was cracked" - ironic name since OTP was not actually used
Related Techniques
- Base64 decoding
- ROT13/Caesar cipher
- Simple substitution recognition