tutorial · bandit

Bandit Level 26 → 27

Use the escaped shell and a local setuid helper to read the next credential.

By

banditsetuidshell-escape
Marks this level complete in your browser.

Goal

From the bandit26 shell, use the provided helper to obtain the password for bandit27.

Why this matters

The level reinforces that gaining a usable shell and crossing a specific privilege boundary are separate steps.

Progressive hints

  1. Hint 1

    First retain the shell from the previous level.

  2. Hint 2

    List the home directory and inspect the helper permissions.

  3. Hint 3

    Run the helper according to its usage output.

Method

Run only the lines that match the evidence you observe.

id && pwd && ls -la
./bandit27-do
./bandit27-do cat /etc/bandit_pass/bandit27

Expected non-secret observation

The helper runs the read command with its configured effective identity and prints the next credential.

Explanation

The pager escape supplies command execution; the setuid binary supplies the narrowly scoped effective UID.

Troubleshooting

  • If you lose the shell, repeat the Level 25 escape.
  • Use ./ to execute the helper from the current directory.

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 27 login. Then mark this transition complete and continue.