← Back to Writeups
CUSTOMMediumSteganography

Omniscient

XESXOR9/2/20264 min read
#steganography#custom#medium#alpha-channel-value-analysis#pixel-masking-by-alpha-value#binary-image-generation-from-a

Omniscient

Platform: hackerlab.pro | Category: Steganography | Type: Challenge | Difficulty: Medium | OS: NA | Author: XESXOR | Date: 2025-12-22 | Status: Solved Techniques: Alpha channel value analysis, Pixel masking by alpha value, Binary image generation from alpha anomalies

Summary

File: Omniscient.zip contains Omniscient.png

Omniscient - hackerlab.pro

Description

"-Бро, видишь что-нибудь? -Ничего, бро -Это наше будущее, бро -Бро..."

File: Omniscient.zip contains Omniscient.png

Analysis

1. Image Investigation

Unpack the archive and analyze the image:

  • Size: 500x360 pixels
  • Format: PNG with RGBA (4 channels, including alpha)
  • Visually: a person with binoculars and text "What do you see / I don't see anything"

2. Hint Interpretation

The dialogue in the description hints at a contrast:

  • "Do you see anything?" - "Nothing" (normal view)
  • Flag: "REDACTED" = "And I can see!" ‍​‌‌​​​​‌​‌‌​​‌‌​​‌‌​​‌‌​​‌‌​​‌​​​​‌‌​​​​​‌‌​​‌‌​​‌‌​​‌​‌​‌‌​​‌​‌‍

This is a classic hint at hidden data that needs to be "seen" in a special way.

3. Alpha Channel Analysis

Alpha channel analysis revealed 4 unique values:

AlphaPixel CountPercentage
252177,40498.56%
253~800~0.44%
254~900~0.50%
255~896~0.50%

Most pixels have alpha=252, but 2596 pixels have different values (253, 254, 255).

4. Anomaly Visualization

Creating a mask of pixels with alpha != 252 shows that these pixels form the flag text! ‍​‌‌​​​​‌​‌‌​​‌‌​​‌‌​​‌‌​​‌‌​​‌​​​​‌‌​​​​​‌‌​​‌‌​​‌‌​​‌​‌​‌‌​​‌​‌‍

Solution

python
#!/usr/bin/env python3
"""
Omniscient - Alpha channel steganography solver
Flag is hidden in pixels with modified alpha values
"""

from PIL import Image
import numpy as np
from collections import Counter

def solve_omniscient(image_path):
    # Load image
    img = Image.open(image_path)
    print(f"Image size: {img.size}")
    print(f"Image mode: {img.mode}")
    
    # Convert to numpy array
    pixels = np.array(img)
    print(f"Array shape: {pixels.shape}")
    
    # Extract alpha channel
    alpha = pixels[:, :, 3]
    
    # Analyze alpha values
    unique_values = np.unique(alpha)
    print(f"\nUnique alpha values: {unique_values}")
    
    # Count occurrences
    alpha_flat = alpha.flatten()
    counts = Counter(alpha_flat)
    print("\nAlpha value distribution:")
    for val, count in sorted(counts.items()):
        print(f"  Alpha={val}: {count} pixels ({count/len(alpha_flat)*100:.2f}%)")
    
    # Find the dominant alpha value (background)
    dominant_alpha = counts.most_common(1)[0][0]
    print(f"\nDominant alpha value: {dominant_alpha}")
    
    # Create mask: highlight pixels with non-dominant alpha
    mask = (alpha != dominant_alpha).astype(np.uint8) * 255
    
    # Save mask image
    mask_img = Image.fromarray(mask)
    mask_img.save('alpha_mask.png')
    print(f"\nMask saved to 'alpha_mask.png'")
    
    # Count anomalous pixels
    anomalous_count = np.sum(alpha != dominant_alpha)
    print(f"Anomalous pixels: {anomalous_count}")
    
    return mask_img
‍​‌‌​​​​‌​‌‌​​‌‌​​‌‌​​‌‌​​‌‌​​‌​​​​‌‌​​​​​‌‌​​‌‌​​‌‌​​‌​‌​‌‌​​‌​‌‍

if __name__ == "__main__":
    solve_omniscient("Omniscient.png")
    print("\n" + "="*50)
    print("Open 'alpha_mask.png' to see the hidden flag!")
    print("="*50)

Script Output

Image size: (500, 360)
Image mode: RGBA
Array shape: (360, 500, 4)

Unique alpha values: [252 253 254 255]

Alpha value distribution:
  Alpha=252: 177404 pixels (98.56%)
  Alpha=253: 800 pixels (0.44%)
  Alpha=254: 900 pixels (0.50%)
  Alpha=255: 896 pixels (0.50%)

Dominant alpha value: 252
Mask saved to 'alpha_mask.png'
Anomalous pixels: 2596
‍​‌‌​​​​‌​‌‌​​‌‌​​‌‌​​‌‌​​‌‌​​‌​​​​‌‌​​​​​‌‌​​‌‌​​‌‌​​‌​‌​‌‌​​‌​‌‍

==================================================
Open 'alpha_mask.png' to see the hidden flag!
==================================================

Result

Opening alpha_mask.png reveals white text on a black background:

CODEBY{REDACTED}

Wordplay

The task is built on a clever wordplay:

  • Description: "Bro, do you see anything?" - "Nothing, bro"
  • Flag: REDACTED = "And I can see!"

Those who know how to "see" hidden data in the alpha channel can see what others cannot.

Alternative Approaches

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

  1. GIMP/Photoshop: Extract alpha channel as a separate layer and increase contrast
  2. zsteg: Can detect anomalies in the alpha channel
  3. stegsolve: View individual bit planes of the alpha channel
  4. Manual analysis: Export alpha channel and analyze histogram

Technique: Alpha Channel Steganography

How It Works

In PNG images, the alpha channel defines the transparency of each pixel:

  • 255 = fully opaque
  • 0 = fully transparent
  • Intermediate values = partial transparency

Small changes in alpha values (e.g., 252 vs 255) are visually imperceptible but can encode information. ‍​‌‌​​​​‌​‌‌​​‌‌​​‌‌​​‌‌​​‌‌​​‌​​​​‌‌​​​​​‌‌​​‌‌​​‌‌​​‌​‌​‌‌​​‌​‌‍

Encoding Methods

  1. Binary mask: Pixels with a specific alpha value form an image
  2. LSB in alpha: Least significant bits of the alpha channel contain data
  3. Multi-level encoding: Different alpha values = different symbols

In this task, the first method was used - pixels with alpha != 252 form the flag text.

Conclusions

This task demonstrates a classic alpha channel steganography technique in PNG. The key to solving it is understanding that the alpha channel can contain hidden information, even if the image looks normal visually. Analyzing the distribution of alpha values and creating a mask of anomalous pixels reveals the hidden message. ‍​‌‌​​​​‌​‌‌​​‌‌​​‌‌​​‌‌​​‌‌​​‌​​​​‌‌​​​​​‌‌​​‌‌​​‌‌​​‌​‌​‌‌​​‌​‌‍