tutorial · bandit

Bandit Level 20 → 21

Coordinate a local listener with a privileged client program.

By

banditnetcatsetuidprocesses
Marks this level complete in your browser.

Goal

Start a listener that supplies the current password to suconnect, then receive the next password.

Why this matters

The level demonstrates two-process coordination, TCP roles, and a narrow privileged protocol.

Progressive hints

  1. Hint 1

    Choose an unused high local port.

  2. Hint 2

    Keep the listener open in one shell and run suconnect in another.

  3. Hint 3

    The listener must send the current credential as a line.

Method

Run only the lines that match the evidence you observe.

# Shell 1
printf '%s\n' '<current-password>' | nc -l -p <high-port>
# Shell 2
./suconnect <high-port>

Expected non-secret observation

suconnect connects to your listener, validates its input, and sends the next credential back across the local connection.

Explanation

Your netcat process is the server; the setuid program is the client and performs the privileged validation.

Troubleshooting

  • Use the same port in both shells.
  • If your nc syntax differs, consult nc -h for its listen form.
  • Enter the real credential only in the game shell, never this site.

Safety and cleanup

  • Use only the OverTheWire game host and your own local practice directory.
  • Do not paste a level password into this site, screenshots, notes, or submissions. Baitaphish never asks for credentials.
  • Treat commands as learning prompts: inspect paths and flags before running them.

Completion and next step

Use the recovered credential only in the official Level 21 login. Then mark this transition complete and continue.