Плотная маскировка
Плотная маскировка
Platform: hackerlab | Category: Steganography | Type: Challenge | Difficulty: Easy | OS: NA | Author: XESXOR | Date: 2026-04-09 | Status: Solved Techniques: line_ending_analysis, morse_code_decoding, punctuation_pattern_extraction
Summary
Task: a ZIP archive contains a DOCX full of generic steganography text, while the hint says the real message was noticed by only a few readers. Solution: ignore the rabbit hole, map line-ending punctuation (.=dot, !=dash), split by line breaks as Morse letters, and decode STEG0D4NC3.
Плотная маскировка — Hackerlab
Description
В задании намекалось, что в документе очень много текста и форматирования, но сообщение заметили лишь немногие.
English summary: The provided file was a ZIP archive containing a DOCX document named Стеганография.docx. The visible text mostly discusses steganography in a generic way, but the real payload is hidden in the punctuation at the ends of the visible lines.
Analysis
The first layer of the challenge is misdirection. A DOCX file named Стеганография.docx suggests that the solution might involve OOXML internals, hidden XML fields, or formatting metadata. However, the actual document content is mostly a rabbit hole: it contains ordinary explanatory text about steganography and does not reveal anything useful by normal reading.
The useful clue is the task hint itself: there is a lot of text and formatting, but only a few people noticed the message. That points away from deep file-format analysis and toward something visible yet easy to ignore.
Looking at the ends of the visible lines reveals a binary-like pattern based on punctuation:
.represents a Morse dot!represents a Morse dash- each line break separates Morse letters
Extracting the punctuation from line endings gives this Morse sequence:
... - . --. ----- -.. ....- -. -.-. ...--
Decoding it letter by letter yields:
S T E G 0 D 4 N C 3
So the hidden string is STEG0D4NC3, and the final flag is CODEBY{REDACTED}.
Solution
Step 1 — Ignore the document rabbit hole
Open the ZIP and inspect Стеганография.docx. The body text looks meaningful, but it is only cover text. The challenge does not require extracting OOXML internals or recovering deleted content.
Step 2 — Focus on line-ending punctuation
Read the visible lines carefully and record the punctuation mark at the end of each non-empty line.
Use the mapping:
.→.in Morse!→-in Morse- new line → separator between Morse letters
This produces:
... - . --. ----- -.. ....- -. -.-. ...--
Step 3 — Decode the Morse
Now decode each Morse token:
...→S-→T.→E--.→G-----→0-..→D....-→4-.→N-.-.→C...--→3
Recovered text:
STEG0D4NC3
Wrap it in the expected flag format:
CODEBY{REDACTED}
python read-only • copy allowed#!/usr/bin/env python3 from pathlib import Path MORSE = { ".-": "A", "-...": "B", "-.-.": "C", "-..": "D", ".": "E", "..-.": "F", "--.": "G", "....": "H", "..": "I", ".---": "J", "-.-": "K", ".-..": "L", "--": "M", "-.": "N", "---": "O", ".--.": "P", "--.-": "Q", ".-.": "R", "...": "S", "-": "T", "..-": "U", "...-": "V", ".--": "W", "-..-": "X", "-.--": "Y", "--..": "Z", ".----": "1", "..---": "2", "...--": "3", "....-": "4", ".....": "5", "-....": "6", "--...": "7", "---..": "8", "----.": "9", "-----": "0", } def extract_morse_from_lines(text: str) -> str: letters = [] for line in text.splitlines(): stripped = line.rstrip() if not stripped: continue symbols = [] for ch in stripped: if ch == '.': symbols.append('.') elif ch == '!': symbols.append('-') if symbols: letters.append(''.join(symbols)) return ' '.join(letters) def decode_morse(morse_text: str) -> str: return ''.join(MORSE[token] for token in morse_text.split()) def main() -> None: # Save the visible document lines to input.txt, one document line per text line. data = Path('input.txt').read_text(encoding='utf-8') morse_text = extract_morse_from_lines(data) decoded = decode_morse(morse_text) print(f'Morse: {morse_text}') print(f'Decoded: {decoded}') print(f'Flag: CODEBY{{{decoded}}}') if __name__ == '__main__': main()