Description
Connect to the server and get the flag.
Setup
Use netcat to connect to the provided host and port.
Solution
- Step 1Connect with netcatRun the nc command with the host and port from the challenge page. The server immediately sends the flag without requiring any input.nc saturn.picoctf.net <PORT>
Learn more
netcat (
nc) is a command-line tool that establishes raw TCP or UDP connections. The basic syntaxnc <host> <port>opens a connection to the specified host on the specified port, then passes data between your terminal's stdin/stdout and the network socket. It is the simplest way to interact with a service that speaks plain text.In CTF challenges,
ncis used to connect to challenge servers that serve flags, run programs, or host interactive puzzles. The host is typically a domain name or IP address, and the port identifies which service on that host to connect to -- similar to how a building address (host) and apartment number (port) together identify a specific destination.Common netcat use cases beyond CTFs include:
- Testing whether a port is open:
nc -zv host port - Listening for incoming connections:
nc -l -p port - Transferring files between machines over a network
- Debugging HTTP or SMTP servers by hand-crafting requests
On some systems, netcat is installed as
ncat(the Nmap version) ornetcat. The flags differ slightly between implementations, but the basic connection syntax is the same. - Testing whether a port is open:
Flag
picoCTF{...}
netcat is the go-to tool for connecting to challenge servers that speak plain text -- it opens a raw TCP connection and passes data between the terminal and the server.