C:\Seyi\Portfolio\writeups\plumbing_ Y:0000PX
...\writeups\plumbing Y:0000PX

< back to write-ups

CTF // MEDIUM plumbing.md

// plumbing

General Skills · Medium · CyLab Security Academy (picoCTF)

// Summary

A server sends back hundreds of lines of text, and the flag is on one of them. Instead of reading it all, the output goes straight into a search tool that prints only the matching line. Like using Ctrl+F on a long receipt.

// Objective

Given: a host and .
Asked: the flag inside the program's output.
Type: stated.

// Recon

wget <host>:<port> — Failed to connect. The service is not a web server.
nc <host> <port> — Hundreds of lines of text scroll past.

// Deduction

  1. A host and port with no URL → a raw text service, not → connect with , not wget.
  2. The output is too long to read → filter it → it into .
  3. The flag format is academy{...} → grep for academy, not picoCTF.

// Solve

  1. nc <host> <port> | grep academy
    Result: the line with the flag.

// Answer

Plain: the flag was one line among hundreds. A filter printed only that line.
Technical: the pipe (|) sends nc's into grep, which prints only the lines containing academy.

// Dead ends

wget — wget speaks HTTP; this port runs a plain text service.
grep picoCTF — This platform's flag format is academy{...}.

// Root cause

Skill tested: sending one program's output into another with a pipe.
Real-world use: analysts filter large log streams the same way to find one event.

// Transfer

  • Host and port, no URL → nc host port.
  • Too much output → | grep <flag prefix>.

// Index

  1. 1PortA numbered door on a server; each service listens on its own.
  2. 2HTTPThe protocol web browsers and wget use to talk to web servers.
  3. 3nc (netcat)A tool that opens a raw connection to a host and port and shows whatever comes back.
  4. 4Pipe (|)Sends the output of the command on the left into the command on the right.
  5. 5grepPrints only the lines that contain a given pattern.
  6. 6Standard output / inputWhere a program writes its text, and where it reads text from.