// 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 port1.
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
- A host and port with no URL → a raw text service, not HTTP2 → connect with nc3, not wget.
- The output is too long to read → filter it → pipe4 it into grep5.
- The flag format is
academy{...}→ grep foracademy, notpicoCTF.
// Solve
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 standard output6 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
- 1PortA numbered door on a server; each service listens on its own.
- 2HTTPThe protocol web browsers and wget use to talk to web servers.
- 3nc (netcat)A tool that opens a raw connection to a host and port and shows whatever comes back.
- 4Pipe (|)Sends the output of the command on the left into the command on the right.
- 5grepPrints only the lines that contain a given pattern.
- 6Standard output / inputWhere a program writes its text, and where it reads text from.