C:\Seyi\Portfolio\writeups\static_aint_always_noise_ Y:0000PX
...\writeups\static_aint_always_noise Y:0000PX

< back to write-ups

CTF // EASY static_aint_always_noise.md

// Static ain't always noise

General Skills · Easy · CyLab Security Academy (picoCTF)

// Summary

The flag is stored inside a program file as plain text, mixed in with unreadable machine code. A helper script copies the readable text into its own file, where the flag can be searched for. Like pulling one key out of a sandbox with a magnet.

// Objective

Given: static, an binary, and ltdis.sh, a .
Asked: the flag.
Type: stated.

// Recon

cat static — Mostly unreadable bytes. The file is compiled machine code.
./ltdis.sh static — Creates static.ltdis.x86_64.txt (the ) and static.ltdis.strings.txt (the readable text).

// Deduction

  1. The file is machine code → the flag can't be read with cat directly.
  2. Text written into a program's code stays readable after compiling () → pull out the readable text.
  3. The script saves its output to two files → search both for academy.

// Solve

  1. ./ltdis.sh static (if it says permission denied, run chmod +x ltdis.sh first)
    Result: two output files.
  2. grep academy static.ltdis.* (searches both output files)
    Result: the flag.

// Answer

Plain: the flag was inside the program as ordinary text. A tool that lists only the readable text found it.
Technical: string literals are stored in the binary as printable bytes. , which ltdis.sh runs, lists every run of 4 or more printable characters, and picks out the flag.

// Dead ends

Assuming the script created the flag — The flag was already in the binary. The script only saved what strings found, so strings static | grep academy does the same in one step.

// Root cause

Skill tested: extracting embedded text from a compiled binary.
Real-world use: running strings is a first step with unknown malware. It shows URLs, IP addresses and messages without running the program.

// Transfer

  • Binary plus "find the flag" → strings file | grep <flag prefix> first.
  • Nothing found → the flag is built while the program runs → run it, or open it in a debugger.

// Index

  1. 1Binary / ELFA program file in the processor's own format. ELF is the standard format on Linux.
  2. 2Shell scriptA text file of terminal commands run in order.
  3. 3DisassemblyMachine code translated into readable assembly instructions.
  4. 4String literalText written directly into a program's code, stored as-is in the compiled file.
  5. 5stringsPrints every run of 4 or more readable characters in a file.
  6. 6grepPrints only the lines that contain a given pattern.