Writeups OverTheWireNatasWebDirectory Listing

Natas 2 Writeup - OverTheWire

Writeup for Natas level 2 from OverTheWire: discovering a directory listing with a password file.

Contents

Wargame: Natas

Level: 2

Category: Web Security

Description

The HTML source references an image in /files/. The web server has directory listing enabled for that path, revealing a users.txt file that contains the natas3 password.

Overview

Solution

response = requests.get(url + "/files/", auth=("natas2", current_password))
# parse directory listing to find users.txt
users = requests.get(url + "/files/users.txt", auth=("natas2", current_password))
# parse natas3 line
result = [l.split(":")[1] for l in users.text.splitlines() if "natas3" in l][0]

Password

G6ctbMJ5Nb4cbFwhpMPSvxGHhQ7I6W8Q

← Back to Blog