← Back to Writeups
CUSTOMMediumMisc

О чём разговор? (What are they talking about?)

XESXOR9/2/20263 min read
#misc#custom#medium#bit-plane-extraction-from-rgb-#kenny-cipher-decoding#pop-culture-knowledge-applicat

О чём разговор? (What are they talking about?)

Platform: hackerlab | Category: Misc | Type: Challenge | Difficulty: Medium | OS: NA | Author: XESXOR | Date: 2025-12-24 | Status: Solved Techniques: Bit plane extraction from RGB channels, Kenny cipher decoding, Pop culture knowledge application

Summary

Task: Image with South Park characters hiding a dialogue. Solution: Extract bit planes from RGB channels to reveal hidden text, decode Kenny Cipher (m, p, f characters) to get the hint "use my father's name", which refers to Stuart McCormick.

О чём разговор? — hackerlab.pro

Description

Кажется, что они стоят молча, но может быть ты сможешь узнать о чём они говорили?

(It seems they stand silently, but maybe you can find out what they were talking about?)

Flag format: CODEBY{...}

Analysis

Given an image task.png with South Park characters. The title hints at a hidden dialogue.

When analyzing the bit planes of the image (extracting individual bits from R, G, B channels), hidden dialogue bubbles were discovered:

  1. r_bit_4.png — Question: "Kenny, tell us the flag to complete the task!"
  2. g_bit_0.png — Kenny's answer: "Fmffmmmpp ppmffm mpfmmmfmpmfpmpppff fmm pppmmmppmmpp" ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

Solution

Step 1: Extracting bit planes

python
#!/usr/bin/env python3
from PIL import Image
import os

def extract_bit_planes(image_path, output_dir):
    """Extract individual bit planes from RGB channels"""
    img = Image.open(image_path)
    pixels = img.load()
    width, height = img.size
    
    os.makedirs(output_dir, exist_ok=True)
    
    for channel_idx, channel_name in enumerate(['r', 'g', 'b']):
        for bit in range(8):
            # Create new image for this bit plane
            bit_img = Image.new('L', (width, height))
            bit_pixels = bit_img.load()
            
            for y in range(height):
                for x in range(width):
                    pixel = pixels[x, y]
                    # Extract specific bit from channel
                    bit_value = (pixel[channel_idx] >> bit) & 1
                    bit_pixels[x, y] = bit_value * 255
            
            bit_img.save(f"{output_dir}/{channel_name}_bit_{bit}.png")
            print(f"Saved {channel_name}_bit_{bit}.png")
‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

extract_bit_planes("task.png", "planes")

Step 2: Analyzing discovered planes

In r_bit_4.png the text is visible:

"Kenny, tell us the flag to complete the task!"

In g_bit_0.png Kenny's answer is visible:

"Fmffmmmpp ppmffm mpfmmmfmpmfpmpppff fmm pppmmmppmmpp"

Step 3: Decoding Kenny Cipher

Kenny Cipher is a well-known encoding based on how Kenny speaks in South Park (his speech is muffled by his hood). Each letter is encoded with 3 characters from the set {m, p, f}:

mmm=a  mmp=b  mmf=c  mpm=d  mpp=e  mpf=f  mfm=g  mfp=h  mff=i
pmm=j  pmp=k  pmf=l  ppm=m  ppp=n  ppf=o  pfm=p  pfp=q  pff=r
fmm=s  fmp=t  fmf=u  fpm=v  fpp=w  fpf=x  ffm=y  ffp=z

‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

python
#!/usr/bin/env python3

def decode_kenny(text):
    """Decode Kenny cipher"""
    kenny_map = {
        'mmm': 'a', 'mmp': 'b', 'mmf': 'c', 'mpm': 'd', 'mpp': 'e',
        'mpf': 'f', 'mfm': 'g', 'mfp': 'h', 'mff': 'i', 'pmm': 'j',
        'pmp': 'k', 'pmf': 'l', 'ppm': 'm', 'ppp': 'n', 'ppf': 'o',
        'pfm': 'p', 'pfp': 'q', 'pff': 'r', 'fmm': 's', 'fmp': 't',
        'fmf': 'u', 'fpm': 'v', 'fpp': 'w', 'fpf': 'x', 'ffm': 'y',
        'ffp': 'z'
    }
    
    # Remove spaces and convert to lowercase
    text = text.lower().replace(' ', '')
    
    result = []
    for i in range(0, len(text), 3):
        trigram = text[i:i+3]
        if trigram in kenny_map:
            result.append(kenny_map[trigram])
        else:
            result.append('?')
    
    return ''.join(result)
‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

# Kenny's encoded message
kenny_speech = "Fmffmmmpp ppmffm mpfmmmfmpmfpmpppff fmm pppmmmppmmpp"
decoded = decode_kenny(kenny_speech)
print(f"Decoded: {decoded}")
# Output: usemyfathersname

Step 4: Determining the flag

Decoded message: "usemyfathersname" (use my father's name)

Kenny's father in South Park is Stuart McCormick.

Flag: CODEBY{REDACTED}

References