Writeups OverTheWireBanditLinuxsetuidShell Escape

Bandit 26 Writeup - OverTheWire

Writeup for Bandit level 26 from OverTheWire: using a setuid binary after escaping the restricted shell.

Contents

Wargame: Bandit

Level: 26

Category: Linux Fundamentals

Description

After escaping bandit26’s restricted shell (see level 25), a setuid binary bandit27-do is in the home directory. It runs commands as bandit27. Use it to read the next password.

Overview

Solution

# Inside the shell obtained from bandit25 escape:
./bandit27-do cat /etc/bandit_pass/bandit27

Password

YnQpBuifNMas1hcUFk70ZmqkhUU2EuaS

← Back to Blog