Writeups OverTheWireBanditLinuxsetuid

Bandit 19 Writeup - OverTheWire

Writeup for Bandit level 19 from OverTheWire: using a setuid binary.

Contents

Wargame: Bandit

Level: 19

Category: Linux Fundamentals

Description

The home directory contains a setuid binary bandit20-do. It runs commands as bandit20. Use it to read bandit20’s password file.

Overview

Solution

channel = connect.system("./bandit20-do cat /etc/bandit_pass/bandit20")
result = channel.recv().decode().strip()

Password

VxCazJaVykI6W36BkBU0mJTCM8rR95XT

← Back to Blog